nhurst1369
MIS
I'm new to ASP so I'll apologize in advance for not being able to figure this out. I can't get my update statement to work when I include either a date or a number field. Here's the code:
<%
Dim ID, status, results, tester, notes, timestamp
ID= Request.Form("ID"
status= Request.Form("status"
results= Request.Form("results"
tester= Request.Form("tester"
notes= Request.Form("notes"
timestamp= Request.Form("timestamp"
if tester="" OR notes="" then
Response.Write "Either the Testers Name or the Notes field were left empty, please try again!"
Else
Dim Conn , Rs, sql
Set Conn = Server.CreateObject("ADODB.Connection"
Set Rs = Server.CreateObject("ADODB.Recordset"
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("sr6.mdb"
sql= "Update tbldts Set status = '" & status & "', results='" & results &"', tester='" & tester &"', notes ='" & notes &"', timestamp='" & timestamp &"' WHERE index="&ID
Rs.Open sql, Conn
Conn.Close
Set Rs=Nothing
Set Conn = Nothing
Response.Write "Successfully Updated"
End If
%>
The timestamp field is a date and whenever I take it out of the update statement it works. Any help would be greatly appreciated. Thanks.
<%
Dim ID, status, results, tester, notes, timestamp
ID= Request.Form("ID"
status= Request.Form("status"
results= Request.Form("results"
tester= Request.Form("tester"
notes= Request.Form("notes"
timestamp= Request.Form("timestamp"
if tester="" OR notes="" then
Response.Write "Either the Testers Name or the Notes field were left empty, please try again!"
Else
Dim Conn , Rs, sql
Set Conn = Server.CreateObject("ADODB.Connection"
Set Rs = Server.CreateObject("ADODB.Recordset"
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("sr6.mdb"
sql= "Update tbldts Set status = '" & status & "', results='" & results &"', tester='" & tester &"', notes ='" & notes &"', timestamp='" & timestamp &"' WHERE index="&ID
Rs.Open sql, Conn
Conn.Close
Set Rs=Nothing
Set Conn = Nothing
Response.Write "Successfully Updated"
End If
%>
The timestamp field is a date and whenever I take it out of the update statement it works. Any help would be greatly appreciated. Thanks.