Interviews3 answers
If i have two queries in one stored procedure and i want the result of second query how ?
3 Answers
incase ur using datareader u can get result of second query by dr.nextresult(); where dr is datareader, with method nextresult u will be taken to result of next query and in the same way u can use any number of time to get results from any multiple queries used in single procedure.
jassi chauhanPosted Jan 12, 2007, 2:58 AM EST
First of all try to send bit parameter and based upon that fire single query. If not possible just fill the dataset and pick second table like ds.Tables[1].
Thanks,
Gurjinder Singh Brar
http://agileguru.blogspot.com
Gurjinder Singh BrarPosted Dec 29, 2006, 3:53 AM EST
We can have many Queries in the same Stored Procedure. But to get the Output only from a particular Query ( in this case 2nd) Return the 2nd queries paramaters as output parameters of the Stored Procedure.
aravindhan rangarajanPosted Dec 19, 2006, 8:54 AM EST
