I'm trying to run a stored procedure from an Access form. Below is the code. I'm getting the error message that The Microsoft Jet database engine cannot find the input table or query 'dbo.'
Private Sub cmdRefreshTbl_Click()
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
Set cnn = New ADODB.Connection
cnn.Open "ODBC;DATABASE=IMISDB;UID=sa;PWD=123;DSN=iMIS MS SQL"
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.rpt_MO_Profile_Export"
cmd.CommandType = adCmdStoredProc
Set rst = cmd.Execute
End Sub
Anna Jaeger
iMIS Database Support
Private Sub cmdRefreshTbl_Click()
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
Set cnn = New ADODB.Connection
cnn.Open "ODBC;DATABASE=IMISDB;UID=sa;PWD=123;DSN=iMIS MS SQL"
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.rpt_MO_Profile_Export"
cmd.CommandType = adCmdStoredProc
Set rst = cmd.Execute
End Sub
Anna Jaeger
iMIS Database Support