Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to via ADO database program to accomplish remote database connection .
Posted
Updated 27-Jul-11 19:05pm
v3

1 solution

A cryptic question - it would help if you provide some more detail.

If you are using ODBC, you can use a data source that resides remotely in the same way as one that resides on the local computer. In C++ program that utilizes ODBC the location of database is totally transparent.

You can configure data source programatically using something like:
VB
SQLConfigDataSource(NULL,ODBC_ADD_DSN, "Excel Files (*.xls)",
                   "DSN=New Excel Data Source\0"
                   "Description=New Excel Data Source\0"
                   "FileType=Excel\0"
                   "DataDirectory=Q:\\EXCELDIR\0"
                   "MaxScanRows=20\0");


Where Q: could be a remote location
 
Share this answer
 
v2
Comments
wisrael 27-Jul-11 6:15am    
thank you firstly.the question means that user can connect to a remote related database when run a .exe file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900