Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute sp_test.sql from VFP9
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Execute sp_test.sql from VFP9
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01101143
Message ID:
01101143
Vues:
58
want to run a sp_test.sql
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_test
using 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	
endif
getting this error
Line 4: Incorrect syntax near 'go'.
I can run this same sp_test.sql using QA and it does ok.
what is the difference.
can you help?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform