ODBC error - how debug ???

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)
 
A

Andi Mayer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top