Changed Object Ownership, Cannot Run Stored Procedure (ADP 2k3)

B

Ben

Hello
I built an ADP app where all the objects where owned by "dbo". Now I have
switched it and haved tried to make the appropriate chagnes, however, i am
getting a message saying the stored procedure expects a paramater @SBValue
that was not supplied, even though it is.

Any suggestions?

Dim cmdGetSwitchBoardItems As New ADODB.Command
Dim rst As New ADODB.Recordset

' Set CommandText equal to the stored procedure name.
cmdGetSwitchBoardItems.CommandText = "eID_Admin.spSwitchBoard"
cmdGetSwitchBoardItems.CommandType = adCmdStoredProc
cmdGetSwitchBoardItems.ActiveConnection = CurrentProject.Connection

On Error GoTo errMenu

' Automatically fill in parameter info from stored procedure.
cmdGetSwitchBoardItems.Parameters.Refresh

' Set the param value.
'Error occurs at the next line, setting the parameter value
cmdGetSwitchBoardItems.Parameters("@SBValue") = Me.SwitchboardID

' Execute the storedprocedure
Set rst = cmdGetSwitchBoardItems.Execute
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top