if exists (select * from sysobjects where id = object_id('sp_test') and sysstat & 0xf = 4) drop procedure sp_test go Create Procedure sp_test as select GetDate() as DateTime go --Exec sp_testusing this VFP code
SqlCmd = FILETOSTR('C:\Projects\IMS\Sql\Procedures\sp_test.sql') RetVal = SQLEXEC( ConNumber, SqlCmd, "" ) IF RetVal < 0 =AERROR(aErrorArray) && Data from most recent error FOR n = 1 TO 7 ? n,aErrorArray(n) ENDFOR endifgetting this error
Line 4: Incorrect syntax near 'go'.I can run this same sp_test.sql using QA and it does ok.