|
-
Apr 1st, 2003, 09:10 AM
#1
Thread Starter
Member
Return Store Procedure
Dear All
I am calling the store procedure from my .net code
that store procedure return 0 if successfull and
return 1 if fails
Please could you tell me how can i return this 0 or 1 to my .NET code
Many Thanks in advance
salih
-
Apr 1st, 2003, 09:39 AM
#2
Hyperactive Member
You need to add a return value paramater to your parameter collection.
I think it also has to be the 1st one.
Something like:
Code:
Dim myParm As SqlClient.SqlParameter
myParm = myCmd.Parameters.Add("RETURN_VALUE", SqlDbType.Int)
myParm.Direction = ParameterDirection.ReturnValue
-
Apr 1st, 2003, 09:44 AM
#3
PowerPoster
I think it also has to be the 1st one.
No, it doesn't have to be the first parameter in the collection. I usually put my return value as the last one in the collection. You can put it anywhere, but it is better practice to put it as the first or last in the collection.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|