Hi all,
I don't claim to know much about Access, so be kind. Here's what I've got I've been given some code to convert to work with a newer ODBC driver. THe code runs fine under ODBC2 (the old driver) but no longer works in ODBC3 (new driver). Here's the problem (as far as I can tell):
Dim ws as Workspace ' workspace
Dim msa as Database ' Access db
Dim tdata as Database ' ODBC DB
Set ws = DBEngine(0)
Set msa = ws(0)
Set tdata = ws.Opendatabase("",False,False,CS)
I think this is old syntax, and it has been difficult finding any information on it. My main question is what is DBEngine(0)? My best guess is that it is the workspace object, seeing as DBEngine(0)(0) is the database object. Is there a more acceptable way of writing this (newer more accepted syntax)? If so what would you recommend?
(I say this is old code because there are calls to DB_OPEN_DYNASET, DB_APPENDONLY, etc. But those were easier to fix. )
I just fought an uphill battle changing ODBC2 code to ODBC3 code in some C++ processes here, now it looks like I'm going to have to learn the quirks in Access as well.
Thanks in advance, I may have some other questions later.
I don't claim to know much about Access, so be kind. Here's what I've got I've been given some code to convert to work with a newer ODBC driver. THe code runs fine under ODBC2 (the old driver) but no longer works in ODBC3 (new driver). Here's the problem (as far as I can tell):
Dim ws as Workspace ' workspace
Dim msa as Database ' Access db
Dim tdata as Database ' ODBC DB
Set ws = DBEngine(0)
Set msa = ws(0)
Set tdata = ws.Opendatabase("",False,False,CS)
I think this is old syntax, and it has been difficult finding any information on it. My main question is what is DBEngine(0)? My best guess is that it is the workspace object, seeing as DBEngine(0)(0) is the database object. Is there a more acceptable way of writing this (newer more accepted syntax)? If so what would you recommend?
(I say this is old code because there are calls to DB_OPEN_DYNASET, DB_APPENDONLY, etc. But those were easier to fix. )
I just fought an uphill battle changing ODBC2 code to ODBC3 code in some C++ processes here, now it looks like I'm going to have to learn the quirks in Access as well.
Thanks in advance, I may have some other questions later.