I try to query a progress database from VB code developped in Access2000. My ODBC Connection is OK (I use it in Crystal Reports) but I can't see the contents of my table.
Here is the code I'm using :
Dim wrkODBC As Workspace
Dim conPubs As Connection
Dim qryP As QueryDef
Dim rst1 As DAO.Recordset
Set wrkODBC = CreateWorkspace
"SILVER", "name", "passwd", dbUseODBC)
Set conPubs = wrkODBC.OpenConnection("SILVER", , , "ODBC;DATABASE=silv-exp;UID=name;PWD=passwd;DSN=SILVER"
Set qryP = conPubs.CreateQueryDef(rst1, "SELECT * FROM sdtpra"
Set rst1 = qryP.OpenRecordset
I have the following message :
"ODBC Call failed"
Thank you for your answers and ... sorry for my english
Here is the code I'm using :
Dim wrkODBC As Workspace
Dim conPubs As Connection
Dim qryP As QueryDef
Dim rst1 As DAO.Recordset
Set wrkODBC = CreateWorkspace
"SILVER", "name", "passwd", dbUseODBC)
Set conPubs = wrkODBC.OpenConnection("SILVER", , , "ODBC;DATABASE=silv-exp;UID=name;PWD=passwd;DSN=SILVER"
Set qryP = conPubs.CreateQueryDef(rst1, "SELECT * FROM sdtpra"
Set rst1 = qryP.OpenRecordset
I have the following message :
"ODBC Call failed"
Thank you for your answers and ... sorry for my english