Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLCONNECT and SQLEXEC
Message
 
À
03/10/2002 11:20:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00707352
Message ID:
00707369
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform