Guest_imported
New member
- Jan 1, 1970
- 0
Can someone help me? I want to be able to use an apostrophe in my form input.
Here is my code.
namedrop=request.form("namedrop"
sql= "insert into orderitems (orderid,productid,qty,mysize,mycolor,priceperunit,namedrop) values (" & orderid & "," & bin(i,0) & "," & bin(i,1) & ",'" & cstr(mysize) & "','" & cstr(mycolor) & "'," & currentprice & ",'" & cstr(namedrop) & "')"
set rsorderitems=db.execute(sql)
The form is a text input field.
If i enter something like: Mommas Boy
then it works.
If I enter something like: Momma's Boy
then i get an error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Momma's Boy')'.
I thought that typecasting it with cstr would fix this. Why not?
Any help appreciated.
Here is my code.
namedrop=request.form("namedrop"
sql= "insert into orderitems (orderid,productid,qty,mysize,mycolor,priceperunit,namedrop) values (" & orderid & "," & bin(i,0) & "," & bin(i,1) & ",'" & cstr(mysize) & "','" & cstr(mycolor) & "'," & currentprice & ",'" & cstr(namedrop) & "')"
set rsorderitems=db.execute(sql)
The form is a text input field.
If i enter something like: Mommas Boy
then it works.
If I enter something like: Momma's Boy
then i get an error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Momma's Boy')'.
I thought that typecasting it with cstr would fix this. Why not?
Any help appreciated.