Could someone please help. I get the following error:
Drivers error '80040e14'
Syntax error in INSERT INTO statement
I've looked at that line but cannot work it out...
Thanks,
Marcus
<%
view = request.querystring("view"
' set up database conection
' this connection does not require an ODBC reference
path = Trim(Server.MapPath("/fpdb")
conn_string = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" + path + "\user_notes.mdb"
Set con = Server.CreateObject("ADODB.Connection"
con.open conn_string
if view = "upload" then
if request.form("send" <> "" then
User_ID = request.form("User_ID"
Machine_ID = request.form("Machine_ID"
Software_Notes = request.form("Software_Notes"
Hardware_Notes = request.form("Hardware_Notes"
General = request.form("General"
'Replace " and ' signs prior to SQL
User_ID=replace(User_ID,"""",""""""
User_ID=replace(User_ID,"'","''"
Machine_ID=replace(Machine_ID,"""",""""""
Machine_ID=replace(Machine_ID,"'","''"
Software_Notes=replace(Software_Notes,"""",""""""
Software_Notes=replace(Software_Notes,"'","''"
Software_Notes=replace(Software_Notes,chr(10),"<p></p>"
Hardware_Notes=replace(Hardware_Notes,"""",""""""
Hardware_Notes=replace(Hardware_Notes,"'","''"
Hardware_Notes=replace(Hardware_Notes,chr(10),"<p></p>"
General=replace(General,"""",""""""
General=replace(General,"'","''"
General=replace(General,chr(10),"<p></p>"
mySQL = "INSERT INTO User_table (user_id, machine_id, software_notes, hardware_notes, general) VALUES ('" & user_id & "', '" & machine_id & "', '" & software_notes & "', '" & hardware_notes & "', '" & general & "');"
con.Execute(mySQL)
end if
end if
%>
Drivers error '80040e14'
Syntax error in INSERT INTO statement
I've looked at that line but cannot work it out...
Thanks,
Marcus
<%
view = request.querystring("view"
' set up database conection
' this connection does not require an ODBC reference
path = Trim(Server.MapPath("/fpdb")
conn_string = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" + path + "\user_notes.mdb"
Set con = Server.CreateObject("ADODB.Connection"
con.open conn_string
if view = "upload" then
if request.form("send" <> "" then
User_ID = request.form("User_ID"
Machine_ID = request.form("Machine_ID"
Software_Notes = request.form("Software_Notes"
Hardware_Notes = request.form("Hardware_Notes"
General = request.form("General"
'Replace " and ' signs prior to SQL
User_ID=replace(User_ID,"""",""""""
User_ID=replace(User_ID,"'","''"
Machine_ID=replace(Machine_ID,"""",""""""
Machine_ID=replace(Machine_ID,"'","''"
Software_Notes=replace(Software_Notes,"""",""""""
Software_Notes=replace(Software_Notes,"'","''"
Software_Notes=replace(Software_Notes,chr(10),"<p></p>"
Hardware_Notes=replace(Hardware_Notes,"""",""""""
Hardware_Notes=replace(Hardware_Notes,"'","''"
Hardware_Notes=replace(Hardware_Notes,chr(10),"<p></p>"
General=replace(General,"""",""""""
General=replace(General,"'","''"
General=replace(General,chr(10),"<p></p>"
mySQL = "INSERT INTO User_table (user_id, machine_id, software_notes, hardware_notes, general) VALUES ('" & user_id & "', '" & machine_id & "', '" & software_notes & "', '" & hardware_notes & "', '" & general & "');"
con.Execute(mySQL)
end if
end if
%>