Connect to MS Access

General discussion forum about all databases other than SqlBase.

Connect to MS Access

Post by matelix » 02 Sep 2012, 22:25

Hi All

I need to connect to an MS Access database via TD 5.2, I'm looking for something similar to the VB jet engine or ADO connection. Does TD have anything like this?

Thanks in advance

Jeff Luther

Re: Connect to MS Access

Post by Jeff Luther » 04 Sep 2012, 18:17

Connection is likely via ODBC.


Re: Connect to MS Access

Post by matelix » 06 Sep 2012, 14:50

I feared that might be the case. Can i at least automate the ODBC connection? I don't want the user to go fiddling with these settings for themselves

Thanks Jeff

Posts: 170
Joined: 14 Jun 2017, 15:04
Location: Italy

Re: Connect to MS Access

Post by gigit » 06 Sep 2012, 16:15

Hi, Matelic.
You only need and entry in your SQL.INI like this.
No DSN is required, only drivers installed.
Or, of course, you can build the connection string into the application.

; ------------------------- DLL per odbc

; Connection strings

REMOTEDBNAME=AGEPRO,Driver=Microsoft Access Driver (*.mdb);Dbq=G:\database\access\agepro.mdb;MaxBufferSize=2048;PageTimeout=5;UID=admin;

REMOTEDBNAME=WIGWAM,Driver=Sql Server;Server=GIGI01\SQL2008R2;Database=WIGWAM;LastUser=sa;UseProcForPrepare=0;AnsiNPW=No;QuotedId=No;AutoTranslate=No;Language=English

Jeff Luther

Re: Connect to MS Access

Post by Jeff Luther » 06 Sep 2012, 22:54

gigit is correct about the TD SQL.INI setting, but just to be sure you are clear: if will not work if [win32client.dll] section only has the comdll= entry for ODBC. This is correct -- and I will keep the comment that's in the default INI file on install:

; order of win32client dll's is important when connecting to multiple databases.
; sqlws32 should always be the last and sqlodb32 be 2nd last.
; comdll=sqlifx32
; comdll=sqlora32
; comdll=sqlsyb32

I've put in bold the fact that sqlodb32 is second to last, and even if you do not connect to SQLBase, that last entry must be there: comdll=sqlws32
Reason? That enables TD internally to call common/general SQL/API functions that are needed for any DB connectivity.

Return to “General Discussion”

Who is online

Users browsing this forum: [Applebot], [Ccbot] and 3 guests