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".