This topic is locked

Syntax Error In Update Satement

10/18/2013 10:15:05 PM
ASPRunnerPro General questions
lefty author

I have the following statement to update another table. I keep getting an error using either custom update or dal . For this question I will use

the dict statement as it should work normally. see below
If values("fldround")="1" Then
dal.Table("Road_Cup").Param("fldlast")=values("fldlast")

dal.Table("Road_Cup").Value("fldpts1")=values("Total_Points1")

dal.Table("Road_Cup").Value("updown1")=values("Plus_Minus1")

dal.Table("Road_Cup").Update()

else

end if
If values("fldround")="2" Then
dal.Table("Road_Cup").Param("fldlast")=values("fldlast")

dal.Table("Road_Cup").Value("fldpts2")=values("Total_Points1")

dal.Table("Road_Cup").Value("updown2")=values("Plus_Minus1")

dal.Table("Road_Cup").Update()

else

end if
If values("fldround")="3" Then
dal.Table("Road_Cup").Param("fldlast")=values("fldlast")

dal.Table("Road_Cup").Value("fldpts3")=values("Total_Points1")

dal.Table("Road_Cup").Value("updown3")=values("Plus_Minus1")

dal.Table("Road_Cup").Update()

else

end if
All fields except fldround (text) field are numeric . Using Access Database.
Error Message is :

Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/output/include/aspfunctions.asp, line 1303

Line 1303

function db_exec(sSQL,conn)

if IsIdentical(dDebug,true) then response.write sSQL & "
"

conn.Execute sSQL

call ReportError

end function

admin 10/21/2013

Turn on debug mode to see the actual SQL Query printed:

http://xlinesoft.com/asprunnerpro/docs/debugging_tips.htm
Then post your query here.