Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC connection
Message
 
 
À
25/06/2001 23:24:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00522306
Message ID:
00523450
Vues:
8
Hi!

>thank ypu very much, but i don't know how to use 'ODBC connection string'

Try following in the VFP command window:
nn = SQLStringConnect("Driver=SQL Server;SEREVR=MYSERVERMACHINENAME;Database=MyDatabase;UID=sa;PWD=password;")
SQLEXEC(nn,"SELECT * from MyTable","MyCorsor")
select MyCursor
browse normal
Instead of MYSERVERMACHINENAME put the name of the SQL Server. Do the same with other values (database name on SQL Server; UID - user name, PWD - password, oristead of the use TRUSTED_CONNECTION=YES if SQL Serevr allows tructed connection).

Take a look to the help file for SQLStringConnect and SQLExec functions.

When you design connection in the connection designer, choose second option (connection sting), then put the content of above SQLStringConnect function call (Driver=SQL Server;SEREVR=MYSERVERMACHINENAME;Database=MyDatabase;UID=sa;PWD=password;), then test it.

HTH.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform