Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SQLEXEC() for a TSQL file...
Message
From
02/09/2002 03:17:18
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00695487
Message ID:
00695888
Views:
12
This did not work. I get a return value of -1.

ln_conn = SQLCONNECT("DataSource")
lc_file = FILETOSTR("sql.txt")
ln_success = SQLEXEC(ln_conn, lc_file)

NOTE:
ln_success = -1

I also tried w/o the middle man 'lc_file' variable, but to no avail.

This is a TSQL file and needs to run from within VFP.

Any other gurus here who can help?

-- John

>John,
>
>>You can run the 'Upsizing Wizard' and get it to generate the code for upsizing without actually running the upsizing.
>>I've now got that code, but it's in TSQL, not VFP.
>>How do I get SQLEXEC() ro tun the entire file, without parsing it one line at a time? I am pretty sure there is a way. Is it SQLPREPARE()?
>
>You can use filetostr() to read the file into a memory variable and use this variable in SQLEXEC().
>
>HTH,
>Armin
-- John Kiernan
"Maybe Amelia Earhart was just stealing the plane".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform