D
diznuts
due to some tables not being owned by dbo, i needed to change all other
objects to the same owner. I have since updated the db to do this as
well as the ADP. However, when i run the adp, it fails. For some
reason it fails when either refreshing the stored procedure parameters,
or setting a value to a parameter. Usingthe same login in query
analyzer (or the queries tab in access) i am able to view the correct
results.
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.
'FAILS HERE
cmdGetSwitchBoardItems.Parameters.Refresh
' Set the param value.
'FAILS HERE
cmdGetSwitchBoardItems.Parameters("@SBValue") = Me.SwitchboardID
' Execute the storedprocedure
Set rst = cmdGetSwitchBoardItems.Execute
objects to the same owner. I have since updated the db to do this as
well as the ADP. However, when i run the adp, it fails. For some
reason it fails when either refreshing the stored procedure parameters,
or setting a value to a parameter. Usingthe same login in query
analyzer (or the queries tab in access) i am able to view the correct
results.
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.
'FAILS HERE
cmdGetSwitchBoardItems.Parameters.Refresh
' Set the param value.
'FAILS HERE
cmdGetSwitchBoardItems.Parameters("@SBValue") = Me.SwitchboardID
' Execute the storedprocedure
Set rst = cmdGetSwitchBoardItems.Execute