cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
elmtree111
Level 5

how to register ODBC connection in a InstallScript project?

Now I'm working on a InstallScript project.
I want to register ODBC connection using installer(Microsoft ACCESS).
The information is all about how to do it in other kinds of project, dose anyone know how to do it in a InstallScript project??
thanks in advance
Labels (1)
0 Kudos
(4) Replies
Christopher_Pai
Level 16

Back in the day I just installed mdac_typ and wrote out the driver and dsn info to the registry. It just worked...
0 Kudos
elmtree111
Level 5

hi, Christopher. Thank you for your quick response.

I wrote it in this way but it still doesn't work:-(

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\test]

Default blank
DBQ C:\Project\data.MDB
Driver C:\Windows\system32\odbcjt32.dll
DriverId 0x00000019(25)
FIL MS Access;
PWD blank
SafeTransactions 0x00000000(0)
systemDB C:\Project\SYSTEM.MDA
UID admin

I can find it in registry editor, but if i check control panel--admin tools--Data Sourc(ODBC)--System DSN, it is not there.
help!
0 Kudos
Christopher_Pai
Level 16

It's been a long time ( MSI makes me lazy and forgetfull ) so setup your DSN by hand and go into regedit and export the key.

Reimage the machine and then apply the reg file and see if it comes back. If so, migrate that over into your install. Rinse and repeat with automation.

Edit: Flashback.... your missing a registry entry value under ODBC.INI\ODBC DAta Sources that points to the DSN registry key you created.
0 Kudos
elmtree111
Level 5

thank you soooooooo much,Christopher!! It works now!!!:p
0 Kudos