Discussion Locked

Sql Update statement

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello
i have created 1 table in sql
as define below in this insert statement is working but update statement is not working.
the error message is
Microsoft OLE DB Provider for SQL Server error '80040e31'

Timeout expired

/member/membreg3.asp, line 66
tabel--field_detail
a - numeric,b -varchar,c=varchar,d=varchar,e=varchar,f=numeric g =numeric,h = int(auto generate)
For b=1 to session("nooff")
nmfield=Request.Form("finm" & b)
web=Request.Form("fieldweb" & b)
busntype=Request.Form("busntypecmb" & b)
actitype=Request.Form("activitycmb" & b)
noofcat=Request.Form("catno" & b)
fieldno=Request.Form("fino" & b)
if rs.EOF then
strSQL="insert into field_detail values(" & session("app_no") & ",'" & nmfield & "','" & web & "','" & busntype & "','" & actitype & "'," & noofcat & "," & fieldno & ")"
db.Execute strsql
else
strsql ="update field_detail set b ='" & nmfield & "',c ='" & web & "',d ='" & busntype & "',e ='" & actitype & "',f =" & noofcat & " & g = fieldno where a =" & zz & " and g =" & b & ""

db.Execute strSQL
end if
next%>

2 replies

by jay eckles

In addition to the above answer, don't you have a SQL syntax error here:
" & g = fieldno
shouldn't that be something like
" g = '" & fieldno & "'
?

This discussion is closed to new replies.