PDA

View Full Version : Update record errors


dawilis
04-04-2005, 09:00 AM
when I run my update pageI get an errror, I cant seem to work it out can anyone see where Im going wrong?

id = Request("Id")
WBS_Active = CSQ(request.form("Tech"))
Resolved = request.form("Res")
Repair_det = CSQ(request.form("Repair_detail"))

If Repair_det = "" then
Repair_det = CsQ("No comments By Technician <B>'"& WBS_Active & "'</b>")
end if

SqlUpdate = "Update Fault Set WBS_Active_Who='"& WBS_Active &"',WBS_Acions='"& Repair_det &"',WBS_Resolved='"& Resolved &"' where id ="&id
con.execute(SqlUpdate)

_____________________________________________________
The Output Via response.write
2 .id
Daryl .WBS_Active
Yes .Resolved
No comments By Technician ''Daryl'' .Repair_det
The SQL statement
Update Fault Set WBS_Active_Who='Daryl',WBS_Acions='No comments By Technician ''Daryl''',WBS_Resolved='Yes' where id =2
____________________________________________________________
The Error
# Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Error evaluating CHECK constraint.
/wbs/ResolvedAction.asp, line 26

# Browser Type:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

# Page:
POST 47 bytes to /wbs/ResolvedAction.asp

# POST Data:
Tech=Daryl&Repair_detail=&Res=Yes&Submit=Submit

dawilis
04-04-2005, 03:43 PM
Ok thanks, I found I had not spelled Action right in the Tables Doh!!!