Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC not working with variable as parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00445283
Message ID:
00445310
Vues:
18
Jeff,
Check the original SQL-Server database for the exact spelling/case of "Person".

Have you tried writing the SQLEXEC code as a single line and running this with a macro?
cSQL = [SQLEXEC(lnHandle, 'Select * from Patient', "tCursor")]
? &cSQL
I do this regularly with local data.

HTH
Barbara

>Having trouble with SQL Passthru using VFP 6 and MS SQL 7. I suspend my app where it's failing and manually make a new connection with the following command:
>
>lnhandle=sqlconnect(DSN, UserId, PassWord) - I verify the connection is good.
>
>I define a string variable as lcSQL='Select * from Patient'
>
>This command does NOT work:
>lnRetVal = SQLEXEC(lnHandle, lcSQL, "tCursor")
>
>But this one DOES:
>lnRetVal = SQLEXEC(lnHandle, 'Select * from Patient', "tCursor")
>
>What gives???
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform