Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make in connection string
Message
 
 
To
28/06/2004 03:42:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00917856
Message ID:
00917897
Views:
18
>Dear VFP expert:
> Currently i want to use SQLSTRINGCONNECT() to make a connection to SQL server 2000, what connection string i can use? May you give a sample connection string which i can refer to. Thanks!
lcDb = "pubs"
lcConnStr = "DRIVER=SQL Server;" + ;
			"SERVER=Sql1;" + ;
			"Network=DBMSSOCN;" + ;
			"DATABASE=" + lcDb 
lnConn = SqlStringConnect(lcConnStr)
IF lnConn < 0
	? _ProcessOdbcError()
	RETURN .F.
ENDIF
To get connection string, use ODBC Manager to create FILE DSN with options you want, open it in any text editor and copy it's contents into connection string.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform