belovedcej
Programmer
I have a stored proc (abbreviated here) that works in the query analyzer:
When I run it, I use the same style I have used for dozens of other procs with return parameters:
Problem is, when it gets to the execute line, it gives me an "invalid use of null." I assume it is because it wants me to pass a value into the return parameter. I tried that, too, but it told me I was passing in too many parameters.
Does anyone have any thoughts?
Code:
ALTER Procedure dbo.CSF_UPDATE_Address_SP
(
@Address_ID Integer,
@Line_1_VC30 Varchar(60),
@ReturnID1 Int OUTPUT)
AS
exec sco_db.dbo.address_update_sp
@address_id,
@Line_1_VC30,
@ReturnID = @ReturnID1 OUTPUT
Select @returnID1
When I run it, I use the same style I have used for dozens of other procs with return parameters:
Code:
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
With cmd
.ActiveConnection = CurrentProject.BaseConnectionString
.CommandType = adCmdStoredProc
.CommandText = "dbo.csf_update_address_SP"
.Parameters.Refresh
.Parameters(1) = AddressID
.Parameters(2) = Address1
Set rst = .Execute
End With
saveAddress = cmd.Parameters(3)
Set rst = Nothing
Set cmd = Nothing
Problem is, when it gets to the execute line, it gives me an "invalid use of null." I assume it is because it wants me to pass a value into the return parameter. I tried that, too, but it told me I was passing in too many parameters.
Does anyone have any thoughts?