Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Connection without ODBC DSN
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00814550
Message ID:
00814552
Views:
12
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform