Update And Where
Hi
I am trying to get my underlying Filemaker database to update the records status OnPrintJobEnd.
My code is as follows:
ReferenceField("wodetail.recordid")
dim objConn
dim strConn
dim rs
dim recordid
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Driver=FileMaker Pro;Data Source=LabelVantage;UID=nacp;password=MIS;"
objConn.Execute ("UPDATE wodetail SET status = 'Complete' WHERE Int(Format.NamedSubStrings("recordid").Value)= '" & Field("wodetail.recordid") & "'")
objConn.close
I keep getting the error "Expected End of Statement ")"
The above works absolutely perfectly when a text field is referred to:
ReferenceField("wodetail.printuser")
dim objConn
dim strConn
dim rs
dim printuser
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Driver=FileMaker Pro;Data Source=LabelVantage;UID=nacp;password=MIS;"
objConn.Execute ("UPDATE wodetail SET status = 'Printing' WHERE printuser = '" & Field("wodetail.printuser") & "'")
objConn.close
What am I doing wrong when trying to use a number with the WHERE statement?
Any help would be really appreciated.
Thanks
Nicky
0
-
Hello NickySA,
Taking a look at your code I don't see anything that could cause this problem. Could it maybe be caused by a different script on some other event?
In any case, could you please attach your document and sample of your database so I can perform some tests with them?
Regards.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar