[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2009-05-08
2
Medium Priority
?
430 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 1500 total points
ID: 24338284
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
ID: 24352934
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

649 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