Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programmatically add new data source name?

0 views
Skip to first unread message

dana

unread,
May 8, 2009, 3:47:22 PM5/8/09
to
Is there any way to script the addition of data source names? I have
several I need to add for a number of users. It would be a lot easier
to hand them a script to execute vs. having them add the names
manually through the Control Panel.

Is this possible through "DOS" or must it be done in something like
VBscript?

Thanks.

Dana

Pak-Ming Cheung - MSFT

unread,
May 20, 2009, 11:34:01 PM5/20/09
to
The recommended way is to use the API: SQLConfigDataSource(with fRequest =
ODBC_ADD_DSN)
http://msdn.microsoft.com/en-us/library/ms716476(VS.85).aspx

You can write a simple C++ program taking command-line arguments. Then, your
script can simply call that program with different input argument.

Thanks,
Ming.
WDAC Team, Microsoft.

P.S. We recommend customers to use the forum to ask questions in the future,
where you can obtain a faster response (Forum is at:
http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/threads/)

0 new messages