Solved

Microsoft Command or VB.NET script to create new ODBC system connection

Posted on 2009-05-08
2
418 Views
Last Modified: 2012-05-06
Hi all,

I need to show the "new odbc system dsn creation windows screen" by using command or a script.

By entering the odbcad32 to command prompt,the ODBC settings main screen will popup.What i need to show is the Add new System DSN screen.It can be either the cmd windows command or a specialized VB.NET script.

Thanx
0
Comment
Question by:AGullen2
2 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 500 total points
Comment Utility
I haven't worked with DSNs in a decade, I'd say. I don't know if you can hook into the add dialog easily. Can you create your own dialog (or get the values automatically) and then call into the ODBC API to create it? Seems like a better approach since you know exactly what's going on and if it was successful.

http://www.scribd.com/doc/8477127/Programmatically-Adding-a-DSN-to-a-Machine-Using-VBnet
0
 

Author Comment

by:AGullen2
Comment Utility
The code you mentioned is using ODBC.INI file if i'm not mistaken ,however this file is not used in every OS, especially the new ones.

I've asked another question while i asked this one,have a look at that too:

http://www.experts-exchange.com/Programming/Languages/.NET/Q_24391921.html

Besides i have to use this code not only between SQL Server and other sources but use it between Access and various sources,so i'm not sure if i can use the sqlconfigdatasource for non sql server connections.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoresAverage challenge 8 73
matchUp  challenge 9 71
Using YubiKey with REST API application 2 76
count8 challlenge 13 84
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now