asked on
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
ASKER
ASKER
ASKER
ASKER
ASKER
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
Are you correctly setting the null in the update statement if the form field is empty?
What error do you get?