>Hallo
>When a user (the first time) is running an VFP-application using a SQL-server, he must add an ODBC data source for the server in the Control Panel.
>I wonder if there are any program that can do that automaticly.
>A program who checks if the ODBC data source setup is correct, otherwise doing a ODBC setup on that computer, when the user is starting the VFP-application.
>If there is no other way to do this, except doing it manually from the ControlPanel, I must go around an do it on every computer, because the users can not do it by themselves.
>Thanks in advance
>/Kjell
>( Now running VFP6, but in a few veeks… VFP7)
The alternative is to use a DSN-less connection as in:
nHandle = SQLStringConnect("Driver=SQL Server;Server=myServer;Database=myDB;Trusted_Connection=Yes")
Although this will hard-code the server name on your app. You can also save the settings to a table and construct the connection string on-the-fly.
HTH