General discussion

Locked

Sql Update statement

By Shanghai Sam ·
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%>

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Sql Update statement

by sl-campbell In reply to Sql Update statement

Per MS:

"RESOLUTION
To resolve this problem, obtain the latest service pack for the Microsoft SQL Server 2000 (the Analysis Services Components - Sql2kasp1.exe)"

You can find this at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q290211

(remove any spaces that may have gotten in the URL from copying)

Collapse -

Sql Update statement

by Jay Eckles In reply to Sql Update statement

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 & "'
?

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums