This topic is locked
[SOLVED]

 Syntax error (missing operator) in query expression

2/18/2012 12:50:03 AM
ASPRunnerPro General questions
lefty author

Problem with update statement again .
Asprunner 7.0 build 9948.
The following statement syntax okay in event software .
Server error ; see below. Can't see anything wrong with this????
sql="update Customers set posbal= " & values("poscost") & " " & values("posqty") & " Where Customer ID = " & values("fldcut_num") & " "
All Numeric Fields.
Error Message :

Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'Customer ID = 700056699'.
/cdi/output3/include/dal.asp, line 230
On Print Returns:
update Customers set posbal= 2
15 Where Customer ID = 700056699

Which Seems Perfect????????????
Any Ideas .

admin 2/18/2012

The space between Customerand IDis the problem. If your database is MS Access use

[Customer ID]=...
lefty author 2/25/2012



The space between Customerand IDis the problem. If your database is MS Access use

[Customer ID]=...




It was easier to change the fields to text when using a space in the field name . Learned a lesson here easier to not use space in database.

Thanks admin.

Solved with brackets and change back to text field. and adding
sql="update Customers set posbal=posbal + (" & values("poscost") & " * " & values("posqty")& ") Where [Customer ID] IN (Select [Customer ID] from Customers where [Customer ID] = '" & values("fldcut_num") & "')"