mohammad
Mar 3, 2003, 05:12 AM
Hello
About how can I make update in database that was based in SQL server2000
Details:
I made web pages in ASP, and I want to make update in database from the ASP Page
I made the code but it gave me a message that "operation is not allowed when the object is closed"
Bellow you can see the codes that I made them...
[[[[[
---------------------------------------------------------------------------------------------------
Update.asp:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
Frm=Request.Form
Strname=Request.Form ("name")
Strlname=Request.Form ("lname")
Strphone=Request.Form ("phone")
Strid=Request.Form ("id")
A=Request.QueryString ("name")
B=Request.QueryString ("lname")
C=Request.QueryString ("phone")
Set cn =server.CreateObject ("adodb.connection")
Cn.Open "library"
Sql="update test set name = & strname & , lname = & strlname & , phone = & strphone & where id = & strid & "
Set rs = server.CreateObject ("Adodb.recordset")
Rs.Open sql,cn,1,2
Do while not rs.EOF
About how can I make update in database that was based in SQL server2000
Details:
I made web pages in ASP, and I want to make update in database from the ASP Page
I made the code but it gave me a message that "operation is not allowed when the object is closed"
Bellow you can see the codes that I made them...
[[[[[
---------------------------------------------------------------------------------------------------
Update.asp:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<%
Frm=Request.Form
Strname=Request.Form ("name")
Strlname=Request.Form ("lname")
Strphone=Request.Form ("phone")
Strid=Request.Form ("id")
A=Request.QueryString ("name")
B=Request.QueryString ("lname")
C=Request.QueryString ("phone")
Set cn =server.CreateObject ("adodb.connection")
Cn.Open "library"
Sql="update test set name = & strname & , lname = & strlname & , phone = & strphone & where id = & strid & "
Set rs = server.CreateObject ("Adodb.recordset")
Rs.Open sql,cn,1,2
Do while not rs.EOF