I have read several posts with this heading but none of them have helped.
I have the following error message:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'left(Your Product Ref, fldsize)='4341''.
/control/productoptions_delete.asp, line 38
=======================================
the code is:
Expand|Select|Wrap|Line Numbers
- dim fldsize, prodnum
- dim conn
- prodnum=request("productID")
- fldsize=len(prodnum)
- set Conn = server.createobject("ADODB.CONNECTION")
- Conn.Open "DBQ=" & server.mappath(".../.../db") & "\broomtacklebox.mdb"& ";Driver={Microsoft Access Driver (*.mdb)};"
- Conn.execute "DELETE * FROM edirectory WHERE left(Your Product Ref, fldsize)='" & Replace(prodnum, "'", "''") & "'"
- Conn.close
- set conn = nothing
I have tried several different combinations of apostrophe and double apostrophe but keep getting the same error. The field in the access database is a text field, not a number field.
Can anyone offer a solution?
Regards
Tog