R
Ray
Hi Everyone,
I've got an Access97 application which has a link to an
SQL 7 Server.
In my application I create a stored procedure which I send
to the SQL
server via a passthrough query. I always end up with an
error. If I
copy the created stored procedure to the query analyzer it
works just
fine!
So I now think the problem is in my VBA-code.
This is the code I use to retrieve the desired recordset:
Dim db As Database
Dim strQuery As String
Dim qdefRapp As QueryDef
Set db = CurrentDb()
With CurrentDb.QueryDefs("qrySP_Rapportage")
.SQL = strSQL
.ODBCTimeout = 600
.Execute
End With
Set rstRapportage =
CurrentDb.QueryDefs("qrySP_Rapportage").OpenRecordset
At the Set rstRapportage I get an error which says:
Invalid Operation.
Can anyone tell me what I is wrong here?
Thnx!
I've got an Access97 application which has a link to an
SQL 7 Server.
In my application I create a stored procedure which I send
to the SQL
server via a passthrough query. I always end up with an
error. If I
copy the created stored procedure to the query analyzer it
works just
fine!
So I now think the problem is in my VBA-code.
This is the code I use to retrieve the desired recordset:
Dim db As Database
Dim strQuery As String
Dim qdefRapp As QueryDef
Set db = CurrentDb()
With CurrentDb.QueryDefs("qrySP_Rapportage")
.SQL = strSQL
.ODBCTimeout = 600
.Execute
End With
Set rstRapportage =
CurrentDb.QueryDefs("qrySP_Rapportage").OpenRecordset
At the Set rstRapportage I get an error which says:
Invalid Operation.
Can anyone tell me what I is wrong here?
Thnx!