Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into statement problem!

Status
Not open for further replies.

qasmi

Programmer
Feb 19, 2004
9
PK
I am getting a following error

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

with the following insert into statement....

"INSERT INTO tbl (User_ID, Reffered_By, Communicated_by, Reference_Date, Applicant_Name, Subject, Target_Date, u_Date, Dept_ID, Status, Type_of_Work_ID, c_no) VALUES ("&request.form("txtUserID")&", '"&request.form("txtReferedBy")&"', '" &request.form("txtCommunicatedBy")& "', '" &request.form("txtReferenceDate")& "', '" &request.form("txtApplicant")& "', '" &request.form("txtSubject")& "', '" &request.form("txtTargetDate")& "', '" &request.form("txtDate")& "', " &request.form("txtDept")& ", '" &request.form("txtStatus")& "', " &request.form("txtWorkType")& ", '" &request.form("cno")& "')"

any ideas why it is giving me this error... User_ID, Dept_ID, Type_of_Work_ID are the only numeric fields rest are text fields..... any ideas.... thanks in advance!
 
Look at your variables, depending on how your dates are declared in the database and on the page, but you may need "#" surrounding them.

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top