Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make in connection string
Message
 
 
À
28/06/2004 03:42:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00917856
Message ID:
00917897
Vues:
17
>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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform