Results 1 to 4 of 4

Thread: [Resolved] Read RETURN val from Stored Procedure

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Albany, NY
    Posts
    489

    Resolved [Resolved] Read RETURN val from Stored Procedure

    Normally I use a DataReader to read values from a stored procedure but it is not working in this situation. On a stored procedure that INSERTS into a tabel I have a RETURN statement that returns the @@IDENTITY (identity value for the inserted row, primary key). When I use the code below:
    VB Code:
    1. dr = cmd.ExecuteReader
    2. MsgBox(dr.GetValue(0))
    I get an error that says there is nothing to read. Anybody know how to read this value?
    Last edited by jcfowl; Mar 17th, 2005 at 11:32 AM. Reason: Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width