gcapp
10-08-2002, 06:10 PM
Can someone answer this for me?
I have a database and I am trying to update a record in it.
The datatype for fields Start_Date and End_Date are Date/Time.
I have this code and I get a type mismatch error on the lines in bold.
If Request.Form("btnUpdate") = "Update" Then
RecordSet.Fields("EventID") = Request.Form("intEventID")
RecordSet.Fields("Event_Name") = Request.Form("txtEvent_Name")
RecordSet.Fields("Location") = Request.Form("txtLocation")
RecordSet.Fields("City") = Request.Form("txtCity")
RecordSet.Fields("State") = Request.Form("txtState")
RecordSet.Fields("Zip_Code") = Request.Form("txtZip_Code")
RecordSet.Fields("Description") = Request.Form("txtDescription")
RecordSet.Fields("Start_Date") = Request.Form("txtStart_Date")
RecordSet.Fields("End_Date") = Request.Form("txtEnd_Date")
RecordSet.Fields("Time") = Request.Form("txtTime")
RecordSet.Fields("Phone") = Request.Form("txtPhone")
RecordSet.Fields("Website") = Request.Form("txtWebsite")
RecordSet.Fields("Email") = Request.Form("txtEmail")
RecordSet.Fields("event_image") = Request.Form("txtevent_image")
RecordSet.Update
Updated = "True"
So my question is what should I change the ("txtStart_Date") and ("txtEnd_Date") to??
Is it "intStart_Date"?
I'm not sure what to change the txt part to.
Help please!!
Gary
I have a database and I am trying to update a record in it.
The datatype for fields Start_Date and End_Date are Date/Time.
I have this code and I get a type mismatch error on the lines in bold.
If Request.Form("btnUpdate") = "Update" Then
RecordSet.Fields("EventID") = Request.Form("intEventID")
RecordSet.Fields("Event_Name") = Request.Form("txtEvent_Name")
RecordSet.Fields("Location") = Request.Form("txtLocation")
RecordSet.Fields("City") = Request.Form("txtCity")
RecordSet.Fields("State") = Request.Form("txtState")
RecordSet.Fields("Zip_Code") = Request.Form("txtZip_Code")
RecordSet.Fields("Description") = Request.Form("txtDescription")
RecordSet.Fields("Start_Date") = Request.Form("txtStart_Date")
RecordSet.Fields("End_Date") = Request.Form("txtEnd_Date")
RecordSet.Fields("Time") = Request.Form("txtTime")
RecordSet.Fields("Phone") = Request.Form("txtPhone")
RecordSet.Fields("Website") = Request.Form("txtWebsite")
RecordSet.Fields("Email") = Request.Form("txtEmail")
RecordSet.Fields("event_image") = Request.Form("txtevent_image")
RecordSet.Update
Updated = "True"
So my question is what should I change the ("txtStart_Date") and ("txtEnd_Date") to??
Is it "intStart_Date"?
I'm not sure what to change the txt part to.
Help please!!
Gary