Link to home
Start Free TrialLog in
Avatar of vijayasham
vijayasham

asked on

programmatically configuring the data source and driver

How do we programmatically configure the datasource and associated driver.This can be manually done by clicking on the ODBC icon in the control panel.Since I'am using a CRecordset class,  in the "get default connect" function ,it goes to a predefined data source and if that data source is not registered in the system where the application is running , the program fails telling "data source not found "
Avatar of chensu
chensu
Flag of Canada image

How to add a data source (ODBC)
http://msdn.microsoft.com/library/sdkdoc/sql/6_odbcht_2.htm 

Data Source: Programmatically Configuring an ODBC Data Source
http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_core_data_source.3a_.programmatically_configuring_an_odbc_data_source.htm 

TN048: Writing ODBC Setup and Administration Programs for MFC Database Applications
http://msdn.microsoft.com/library/devprods/vs6/visualc/vcmfc/_mfcnotes_tn048.htm 

HOWTO: Configure ODBC Data Sources on the Fly
http://support.microsoft.com/support/kb/articles/Q110/5/07.asp
Avatar of vijayasham
vijayasham

ASKER

I had already tried using SQLConfig, but the problem is when I open the recordset ,it fails in in the get default connect function.
Any other answers please send to bmveena@hotmail.com.Thanx for the answers
ASKER CERTIFIED SOLUTION
Avatar of inpras
inpras

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial