Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get Setup to add the data source to ODBC?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00119564
Message ID:
00119621
Views:
15
Hi Don,

Try this.


DECLARE Integer SQLConfigDataSource in odbccp32.dll ;
Integer, Integer, String, String
settings="DSN=My Oracle DB"+chr(0)+;
"Description=Oracle 73 Test"+chr(0)+;
"Server=MyDbName"
clear
Success=SQLConfigDataSource(0,1,"Oracle73",settings)
?
? success

Good Luck
Jayesh


>Is there a way to not only have the database installed by Setup, but also to have the ODBC administrator run and add the database as a datasource so I can access the data from my Visual C++ program without first running the ODBC administrator separately. The end user would not appreciate doing this in a typical setup, therefore, I want it to be done by the VFP Setup so it is transparent to the user.
>
>Example:
>
>I have a Visual C++ exe that accesses the aw20.dbc VFP 3.0 database. I had to go to the 32bit ODBC administrator and add aw20 as a data source with Visual FoxPro as the driver before I could run my program and access the database. I want to be able to do that using the setup program or by calling SQLConfigDataSource so the end user doesn't have to mess with ODBC setup.
>
>Thanks for any help. Don West.
- Jayesh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform