Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I have created a sproc which inserts some data and also returns the user_id via the scope_identity().

 

My problem is that I am not having any luck getting the return value when executing the sproc in my asp.net (vb) app. The data seems to insert fine but not the return value I want.

 

Is anyone familiar with how this can be done using the CommandType.StoredProcedure method etc?

 

cheers

Posted

You could use an output parameter to hold this value, or use exec_scalar and use a return in your proc.

 

Of course, I'm assuming you're doing SQL2K when I suggest these options. Either would work.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...