Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLCONNECT and SQLEXEC
Message
 
To
03/10/2002 11:20:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00707352
Message ID:
00707369
Views:
10
>Hi, there're anybody that can tell me how can i use SQLCONNECT and SQLEXEC to access to a SQL table.
>
>excuse my poor english
>Thanx.

If you have a DSN defined on your computer...
lnConnect=SQLCONNECT("yourDSN")

IF lnConnect > 0 && good connection to db
lnRet=SQLEXEC(lnConnect,"Select * from sometable")

ENDIF


If no DSN is defined...

lnConnect=SQLSTRINGCONNECT("Driver=Sql Server;Server=yourserver;Database=yourdatabase;UID=yourloginname;PWD=yourpassword")
IF lnConnect > 0
...
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Reply
Map
View

Click here to load this message in the networking platform