Hi One Stored procedure returning multiple result sets and I need only the last result set, How do I achieve this without changing original procedure. am using the last reulst set in further processing in other Stored procedure.
+2
A:
if you are "filling" a dataset in c#, very simple, just use:
datasetobj.Tables[datasetobj.Tables.Count-1].Table
to get the DataTable
if doing this within sql procedures (i.e. one procedure calling another that returns multiple), best solution would be to use output variables. concept:
procedure1 returns multiple resultsets
when calling:
declare @table1 table (), @table2 table () exec procedure1 out @table1, out @table2
AuEngineer
2010-01-12 05:14:37
Sorry this is with in the other Stored Procedure
rmdussa
2010-01-12 05:18:46
I can't change original Proc
rmdussa
2010-01-12 05:21:41