ODBC System DSN Connection

M

Mark

Is there a way to use VBA to create a ODBC DSN Connection to an Access
mdb file? I'd like to automate the process (as opposed to using the
menu).

Mark
 
R

rhody

Why not jut use ADODB? That way you don't need to create any local DSNs
on each computer nor do you need to maintain them. I believe every
Windows install has the Access driver already there so you will greatly
simplify your maintenance and roll out.

Check out msdn.com for more info or just do a google and you'll get
tons of samples.

hth
Mike
 
M

Mark Roach

A vendor's application (which is a standard in the industry) uses ODBC
connections to open a mdb file. We have a large number of mdb files.
Every time we setup a new PC or add several new projects (with new mdb
files), we have a lot of manual work. So, I'd like to maintain a file
list in Excel and press a button to create the ODBC connections.

Mark Roach
VP Technical Resources
The Oil & Gas Asset Clearinghouse
Houston, Texas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

rhody

Ok but I think the approach sounds strange. ADODB does use ODBC if you
specify that driver. It just seems to me you are trying to replicate a
UI function when you should be programming a solution. But hey
sometimes one just doesn't have enough time. ;)

I would create a master access db which holds the list of production
mdbs in it. You can also use Excel to retrieve and update the table in
Access. Maintain this one Access db with the mdb file names and
locations to pass to the application when the user selects it or the
application needs it. This way you never need to maintain the client,
just the master mdb file. Just my two cents...

Mike
 
Top