DSN Creat at RunTime in VB

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

I want to creat a SQL Server System DSN from my program. Like i have a from there have 4 text box for input the 4 parameter That is- 1. SQL Server Driver Name. 2. User Own DSN Name 3. Server Name (Computer Name) where SQL Server is instaled. 4. Data Source Name (the name of the database which i want to access) Thank you, Chandan Dey

-- Anonymous, August 12, 2004

Answers

Chandan,

You'll want to use the ODBC API function, SQLConfigDataSource. You will need to call this with the fOption set to ODBC_ADD_SYS_DSN.

Hope this helps,

Eric

-- Anonymous, August 12, 2004


Moderation questions? read the FAQ