gbalakri
February 3rd, 2003, 01:30 PM
I have a Stored Procedure in a Sybase database and I have
created an SQL pass through query in Access 2000 to run
the procedure. When I run the pass through query in
vbscript using ADO the stored procedure gets executed
twice( I see it in the ODBC logs). If I use DAO the procedure only gets executed once.
The same issues occurs with SQL server also. Does any one
know how to solve this problem. Attached is the function
that I use
Function RunSql()
Dim rs As Object
Dim cm As Object
Dim stSql As String
Dim iCnt As Integer
Set con = Application.CurrentProject.Connection
stSql = "SELECT * FROM MstLotListQry"
Set cm = CreateObject("ADODB.Command")
cm.ActiveConnection = con
cm.CommandText = stSql
cm.CommandType = adCmdText
cm.Execute iCnt
End Function
created an SQL pass through query in Access 2000 to run
the procedure. When I run the pass through query in
vbscript using ADO the stored procedure gets executed
twice( I see it in the ODBC logs). If I use DAO the procedure only gets executed once.
The same issues occurs with SQL server also. Does any one
know how to solve this problem. Attached is the function
that I use
Function RunSql()
Dim rs As Object
Dim cm As Object
Dim stSql As String
Dim iCnt As Integer
Set con = Application.CurrentProject.Connection
stSql = "SELECT * FROM MstLotListQry"
Set cm = CreateObject("ADODB.Command")
cm.ActiveConnection = con
cm.CommandText = stSql
cm.CommandType = adCmdText
cm.Execute iCnt
End Function