tkelley
2008-11-03 14:39:13 UTC
I have inherited a behemoth of an application developed in A97. I have
finally completed a successful compile and conversion to A2003. The users'
front-end is now being deployed in A2003 Runtime.
There is one place where the code is failing. However, it does not fail for
every user. All users can successfully run in A97. Most users can
successfully run in A2003RT. But there are a handful of users who get the
'ODBC Call Failed' error in A2003RT. It is happening in the code below.
I've marked the failing line with **************.
--------------------------
Public Sub ExecuteSP(strSql As String, strTarget As String)
Dim qdTmp As QueryDef
Set qdTmp = currentdb.CreateQueryDef("")
qdTmp.Connect = "ODBC;DSN=" & strTarget
qdTmp.ReturnsRecords = False
qdTmp.SQL = strSql
qdTmp.Execute dbSQLPassThrough **************
qdTmp.Close
Set qdTmp = Nothing
End Sub
--------------------------
I did not write this code. But when I re-wrote this using ADO, it worked
fine. However, I'm hoping I can find an explanation since it works for the
majority of users. To rewrite every call to ADO would be a daunting task,
and open other margins of error.
Thanks!
finally completed a successful compile and conversion to A2003. The users'
front-end is now being deployed in A2003 Runtime.
There is one place where the code is failing. However, it does not fail for
every user. All users can successfully run in A97. Most users can
successfully run in A2003RT. But there are a handful of users who get the
'ODBC Call Failed' error in A2003RT. It is happening in the code below.
I've marked the failing line with **************.
--------------------------
Public Sub ExecuteSP(strSql As String, strTarget As String)
Dim qdTmp As QueryDef
Set qdTmp = currentdb.CreateQueryDef("")
qdTmp.Connect = "ODBC;DSN=" & strTarget
qdTmp.ReturnsRecords = False
qdTmp.SQL = strSql
qdTmp.Execute dbSQLPassThrough **************
qdTmp.Close
Set qdTmp = Nothing
End Sub
--------------------------
I did not write this code. But when I re-wrote this using ADO, it worked
fine. However, I'm hoping I can find an explanation since it works for the
majority of users. To rewrite every call to ADO would be a daunting task,
and open other margins of error.
Thanks!