Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to specify ODBC connection in EXE?
Message
From
13/10/1998 18:03:31
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
To
13/10/1998 00:02:17
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00146099
Message ID:
00146429
Views:
27
>My VFP 6.0 app reads SQL tables from an accounting package written by another vendor. On my development machine, it is very easy to establish the ODBC connection because I know the name of my server and the database I want to access. However, when I distribute my EXE, the user will have to specify the name of their own server and database. I'm looking for the most user-friendly solution to establish the user's connection. Should I include VFP's connection designer in the EXE or has anyone already written a better user interface to specify connection properties?

On my login form, there is a dropdown combo list that displays all of the available ODBC connections on the user machine. I have these filtered to SQL Server types. When the user selects a data source and enters their password and id, I update the single connection in the database with this information.

Of course, the ODBC connection has to be set up first by the user. For SQL Server, I have an automatic process to add a new data source based on small REG file. This may not work unless you know the path to the tables etc. Using the ODBC wizard might be the easiest thing to do. If you know ahead of time what the data source should look like, you can create a reg file and invoke it automatically.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform