I have a vfp app with a SQL Server backend. When updating a client's database, there's a lot of stored procedures to be added to the database. Instead of going through and doing them by hand, I'd like to know if there's a way to do this from vfp9. This is what I've done so far:
this works with any other normal sql statement. and the string is read in correctly. But it fails when I call sqlexec(). Does anybody know of a way to do this?
BlackDice
Code:
Procedure Runscript
Lparameters tcScriptName
Local lcSQL,lnHandle,lnReturn
lcSQL = Filetostr(tcScriptName)
lnHandle = SQLConnect("myconnection")
If lnHandle > -1
lnReturn = SQLExec(lnHandle,lcSQL,"tempcrsr",ainfo)
ENDIF
=SQLDISCONNECT(0)
Endproc
BlackDice