Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Instead of going into the Data Source Manager and adding a data source manually I would like to be able to use some sort of set up wizard that users can click on and it will install the relevant database into the datasource manager without me having to manually do this. Any ideas.

It depends a bit on which database you are using but, if you have the relevent driver/provider installed on the client PC, then you can connect to the database from within your program using ADO (ActiveX Data Objects). If you don't know much about it then try googling for it, there's plenty of sample code out there you can use.
As far as having the correct drivers on your system, there's three main ways. For Access databases you'll need the lastest JET service pack from MS. For just about everything else you get a download called MDAC from MS. The only exceptions are Oracle and MySQL. MySQL give you a handy download similar to MS's MDAC, but Oracle make you install a full client, which does give you drivers you have to configure a fiddly client install. For this reason alone I'd stay away from Oracle using your going to use Oracle's own front end (Oracle Forms I think).
If after all that, you simply just want the DSN's and aren't interested in programming, then basically, the DSN's are just registry settings. The trick is find where in the registry. Once you've located them, you can export them as a .reg file and install on other machines. You'll still need the drivers though.
Post back if you have any questions.

When you look into the registry, you will entries under HKEY_CURRENT_USER and HEKY_LOCAL_MACHINE.
subkey-software\odbc
depending on whether it's a file or system DSN.You can go through some of the sample dsns in the registry and you can use your program to write to the registry. Use apis to write to the registry.

Thank you for your comments. I think I may be alittle out of my depth but I will have a go anyway. I have located the file in the registry but do not know how to add this file to the registry through VB6.
The file is located in: HKEY_CURRENT_USER/SOFTWARE/ODBC/ODBC.INI and then the file is there a few others.
I would appreciate any help.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |