Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Sql Stored procedure

Sql Stored procedure

Scheduled Pinned Locked Moved Database
databasetutorialhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mahesh1679
    wrote on last edited by
    #1

    Dear Programmers, I have a small problem with sql stored procedure.Does sql storeprocedure can return more than one recordset (for example say 2 recordsets). If so can you pls explain me how to get those 2 recordsets through VB I have already tried the same with single recordset.

    C 1 Reply Last reply
    0
    • M Mahesh1679

      Dear Programmers, I have a small problem with sql stored procedure.Does sql storeprocedure can return more than one recordset (for example say 2 recordsets). If so can you pls explain me how to get those 2 recordsets through VB I have already tried the same with single recordset.

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      A Stored procedure can return more than one record set, e.g.

      CREATE PROCEDURE MyProc
      AS
      SELECT * FROM Products
      SELECT * FROM Orders
      GO

      You don't specify which version of VB so I'll assume you mean VB.NET. You can use the SqlDataAdapter object to fill a DataSet with the results of the stored procedure.


      Do you want to know more? WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

      A 1 Reply Last reply
      0
      • C Colin Angus Mackay

        A Stored procedure can return more than one record set, e.g.

        CREATE PROCEDURE MyProc
        AS
        SELECT * FROM Products
        SELECT * FROM Orders
        GO

        You don't specify which version of VB so I'll assume you mean VB.NET. You can use the SqlDataAdapter object to fill a DataSet with the results of the stored procedure.


        Do you want to know more? WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks for the solution one more thing is that i want to get those recordsets through VB 6.0 Please help me

        A 1 Reply Last reply
        0
        • A Anonymous

          Thanks for the solution one more thing is that i want to get those recordsets through VB 6.0 Please help me

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          Use the RecordSet's NextRecordset() method

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups