ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ODBC System DSN Connection (https://www.excelbanter.com/excel-programming/280041-odbc-system-dsn-connection.html)

Mark[_22_]

ODBC System DSN Connection
 
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

rhody[_9_]

ODBC System DSN Connection
 
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Mark Roach

ODBC System DSN Connection
 
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!

Jake Marx[_3_]

ODBC System DSN Connection
 
Hi Mark,

Does this help?

http://www.andreavb.com/forum/viewtopic.php?TopicID=819

--
Regards,

Jake Marx
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Mark Roach wrote:
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!


rhody[_10_]

ODBC System DSN Connection
 
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 11:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com