zawinulfans
Programmer
Hello everybody,
I'm trying to open an Excel file using ODBC with DAO.
I already know how to open it without ODBC, but at this moment I need
to use ODBC.
Dim wrkodbc As DAO.Workspace
Dim mycon As DAO.Connection
Dim rst As DAO.Recordset
Set wrkodbc = CreateWorkspace("mywks", "admin", "", dbUseODBC)
Set mycon = wrkodbc.OpenConnection("conn1", dbDriverNoPrompt, ,
"ODBC;DSN=test;"
Set rst = mycon.OpenRecordset("Foglio1$"
With this code I get a 3146 runtime error.
Could you help me in some way?
Many thanks in advance,
all the best.
Marco (Italy)
I'm trying to open an Excel file using ODBC with DAO.
I already know how to open it without ODBC, but at this moment I need
to use ODBC.
Dim wrkodbc As DAO.Workspace
Dim mycon As DAO.Connection
Dim rst As DAO.Recordset
Set wrkodbc = CreateWorkspace("mywks", "admin", "", dbUseODBC)
Set mycon = wrkodbc.OpenConnection("conn1", dbDriverNoPrompt, ,
"ODBC;DSN=test;"
Set rst = mycon.OpenRecordset("Foglio1$"
With this code I get a 3146 runtime error.
Could you help me in some way?
Many thanks in advance,
all the best.
Marco (Italy)