If i have two queries in one stored procedure and i want the result of second query how ?
By in ADO.NET on Dec 19 2006
  • jassi chauhan
    Jan, 2007 12

    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.

    • 0
  • Gurjinder Singh Brar
    Dec, 2006 29

    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

    • 0
  • aravindhan rangarajan
    Dec, 2006 19

    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.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS