Page 1 code:
sql = "SELECT * FROM tblStaff WHERE ChartID = " & ChartID
Set objrec = Server.CreateObject("ADODB.Recordset")
objrec.Open sql, objConn
If not objrec.eof then
LibFTE = objrec("LibFTE")
[ALL FIELDS ARE IDENTIFIED.....]
End If
[Standard HTML code. Then display update form]
<p><b>What is the approved FTE?</b>
<input type="text" name="LibFTE" size="9" value="<%=objRec("LibFTE")%>"><br>
Code in End.asp
dim sql, objRec, ChartID
ChartID = Request.form("ChartID")
on error resume next
sql = "SELECT * FROM tblStaff WHERE ChartID = " & ChartID
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open sql, objConn, adLockOptimistic, adCmdTable
objRec("LibFTE") = Request.form("LibFTE")
[all fields identified]
objRec.Update
if err.Number <> 0 then
Response.Write "<font face='Arial'>Data is not updated."
Response.Write "<p>Error updating record, please press the <b>Alt</b> + back arrow to correct."
Response.Write "The most common error is text in the FTE fields."
Response.End
end if
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.