ODBC error - how debug ???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

here is the code that is failing. It works for me but not for my users. They
get a generic 'ODBC call failed' message. They are all set up with the driver
and system dsn and this used to work for them but it now fails. Is there any
way to modify the code to get a more specific ODBC message? Anyone got any
ideas?

Dim ws As Workspace
Dim cn As Connection
Dim rstODBC As Recordset, rstODBC2 As Recordset
Dim strConnection As String
strConnection = "ODBC;DSN=PMMIS AZ Production;DATABASE=PMMIS AZ
Production;UID=Junk;PWD=Junk"
Set ws = CreateWorkspace("", "admin", "", dbUseODBC)
Set cn = ws.OpenConnection("", dbDriverNoPrompt, False, strConnection)
 
here is the code that is failing. It works for me but not for my users. They
get a generic 'ODBC call failed' message. They are all set up with the driver
and system dsn and this used to work for them but it now fails. Is there any
way to modify the code to get a more specific ODBC message? Anyone got any
ideas?

Dim ws As Workspace
Dim cn As Connection
Dim rstODBC As Recordset, rstODBC2 As Recordset
Dim strConnection As String
strConnection = "ODBC;DSN=PMMIS AZ Production;DATABASE=PMMIS AZ
Production;UID=Junk;PWD=Junk"
Set ws = CreateWorkspace("", "admin", "", dbUseODBC)
Set cn = ws.OpenConnection("", dbDriverNoPrompt, False, strConnection)

Try the test-connection in the ODBC-Admin

or leave the dbDriverNoPrompt in the connection string out and look
what is missing in the connection-dialog.

I didn't find any real error messages when I had such problems
 
Back
Top