Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC connection
Message
From
26/06/2001 06:53:16
 
 
To
25/06/2001 23:24:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00522306
Message ID:
00523450
Views:
7
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform