|
-
Nov 13th, 2000, 12:18 PM
#1
Thread Starter
New Member
I am using the ADODB command object to run stored procedures in an SQL Database
The procedure runs ok, i know this because i can see the data changing....However the command object is giving a null value for the return parameter...I need this parameter to pass into another stored procedure ....
has anyone seen this problem before and if so did they find a fix?
heres my statements.
Set objcmd = New ADODB.Command
Set objcmd.ActiveConnection = objconn
'Insert parameters into the stored proceure
objconn.CursorLocation = adUseClient
objcmd.CommandText = "dbo.spa_PackingSlipCreate"
objcmd.CommandType = adCmdStoredProc
objcmd.Parameters.Append objcmd.CreateParameter("RC", adInteger, adParamReturnValue)
objcmd.Parameters.Append objcmd.CreateParameter("OrderNo", adVarChar, adParamInput, 30, "000619-24052")
objcmd.Parameters.Append objcmd.CreateParameter("PackSlipNo", adVarChar, adParamOutput, 30)
objcmd.Execute
'feedback
MsgBox objcmd.Parameters.Item("RC")
MsgBox objcmd.Parameters.Item("OrderNo")
MsgBox objcmd.Parameters.Item("PackSlipNo")
the output parameter is NULL all the time
Please help
Regards
A frustrated programmer
-
Nov 14th, 2000, 05:27 PM
#2
Hyperactive Member
Never tried doing it like that before but it looks to be ok.... what happens when you run the SP in the query analyser window?
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
|