Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters dont work in SqlExec() VFP 6
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Parameters dont work in SqlExec() VFP 6
Miscellaneous
Thread ID:
01117961
Message ID:
01117961
Views:
264
Hi All,
I am developing a software in VFP 6.0 with Sql Server as Backend.
Now the problem is i can not use the variable parameters in SQLEXEC()
xDESIG_CODE = THISFORM.DESIG_CODE.VALUE
A = SQLEXEC(gnConnHandle,"DELETE FROM DESIGNATION WHERE DESIG_CODE = ?xDESIG_CODE")
IF A = 1
	WAIT WIND "Record Deleted." TIMEOUT 1
ELSE
	WAIT WIND "Record Could Not Be Deleted." TIMEOUT 1
ENDIF	 
THE ABOVE CODE DOES NOT WORK BUT IF I DO IT THE OTHER WAY IT IS WORKING
xDESIG_CODE = THISFORM.DESIG_CODE.VALUE
sqlserv = "DELETE FROM DESIGNATION WHERE DESIG_CODE = " + ALLTRIM(STR(xDESIG_CODE))
A = SQLEXEC(gnConnHandle,sqlserv)
IF A = 1
	WAIT WIND "Record Deleted." TIMEOUT 1
ELSE
	WAIT WIND "Record Could Not Be Deleted." TIMEOUT 1
ENDIF	 
IS SOMETHING WRONG IN MY 1ST CODE.
Riyaz Patanwala
I. T. Programmer
Al Jaber Energy Services L.L.C.
P.O.Box 47467
Abu Dhabi, U.A.E.
Tel - +971 2-502-1644
Fax - +971 2-554-6106
Cell - +971 50 358-0229
Email - riyaz.patanwala@ajes.ae
Website - www.ajes.ae
Next
Reply
Map
View

Click here to load this message in the networking platform