I have been trying for days now to insert a date (user input from an ASP page) into an Access2000 database. I keep getting a syntax error.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
Here is my INSERT INTO statement...
SQLstmt = "INSERT INTO Tech_Hours(FK_Tech_ID, FK_Type_ID, FK_Client_ID, [Date], Rate, Hours, Details)"
SQLstmt = SQLstmt & " VALUES("
SQLstmt = SQLstmt & "'" & TechID & "',"
SQLstmt = SQLstmt & "'" & CType & "',"
SQLstmt = SQLstmt & "'" & Location & "',"
SQLstmt = SQLstmt & "" & TDate & ","
SQLstmt = SQLstmt & "'" & Rate & "',"
SQLstmt = SQLstmt & "'" & Hours & "',"
SQLstmt = SQLstmt & "'" & Details & "'"
SQLstmt = SQLstmt & "
;"
I have very little experience with .asp pages or with VBScript. Any help as to how I can make this work would be greatly appreciated!
Oh BTW my date format is Short Date. "dd/mm/yy"
Thanks in advance!
Ken
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
Here is my INSERT INTO statement...
SQLstmt = "INSERT INTO Tech_Hours(FK_Tech_ID, FK_Type_ID, FK_Client_ID, [Date], Rate, Hours, Details)"
SQLstmt = SQLstmt & " VALUES("
SQLstmt = SQLstmt & "'" & TechID & "',"
SQLstmt = SQLstmt & "'" & CType & "',"
SQLstmt = SQLstmt & "'" & Location & "',"
SQLstmt = SQLstmt & "" & TDate & ","
SQLstmt = SQLstmt & "'" & Rate & "',"
SQLstmt = SQLstmt & "'" & Hours & "',"
SQLstmt = SQLstmt & "'" & Details & "'"
SQLstmt = SQLstmt & "
I have very little experience with .asp pages or with VBScript. Any help as to how I can make this work would be greatly appreciated!
Oh BTW my date format is Short Date. "dd/mm/yy"
Thanks in advance!
Ken