I am running a small application that generates a script file that will be run in SQL Server 7. For the most part the script file is a series Insert, Update and Delete statements. To generate the script file I evaluate a VFP string with variables then stuff a line into the script file with the evaluated string.
I now need to also execute a stored procedure from within this script file and have never done this before. The stored procedure I need to execute returns a primary key that is then used later to generate another script line. To execute the stored procedure from within VFP the command line is
SQLExec(lnHandle, "{call generate_pk("mytablename",?@lcid)}", "c_temp")
where "mytablename" is the name of the table and lcid is the pk value to be returned. Will this same syntax work when executed from a script file?
Thanks in advance for any advice you can provide!
Margaret