Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Connection without ODBC DSN
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00814550
Message ID:
00814552
Vues:
13
This message has been marked as the solution to the initial question of the thread.
Troy,

You've extra spaces around '=' in the 'DRIVER=' line which cause that dialog to popup. You can also add 'NETWORK=DBMSSOCN' option to the connection string so it'll use TCP/IP protocol regardless of the client configuration.
lcConnectionString="DRIVER=SQL Server;" ;
		+ "SERVER=development;" ;
		+ "NETWORK=DBMSSOCN;" ;
		+ "UID=myUserID;" ;
		+ "PWD=myPassword;"
		+ "DATABASE=pubs"
See also Re: Verify connection Message #747337 on how to supress login and error ODBC dialogs.

>How can I create a connection to an SQL Datasource without having a named DSN configured in ODBC?
>
>I try the following and a dialog appears with the ODBC configured names:

>ch=SQLSTRINGCONNECT("driver = {SQL Server}; server=development; uid=sa; pwd=secretpassword; database=pubs")
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform