主题:修改错在哪啊?
我已经执行到最后了,但是数据不能修改是为什么啊
代码是这样的
<%
dim Name1,Price1
Name1=request.Form("name")
Price1=request.Form("price")
session
dim conn
set conn=server.createobject("adodb.Connection")
conn.connectionString="Dbq=C:\Inetpub\wwwroot\canting.mdb;Driver={Microsoft Access Driver (*.mdb)}"
conn.mode=0
conn.open
dim comm
set comm=server.CreateObject("adodb.Command")
comm.ActiveConnection=conn
comm.commandtype=1
dim sqlstr
sqlstr="update caipu set name='"&Name1&"',price='"&price&"' where number="& CInt(Request("number"))
comm.commandtext=sqlstr
set rs=comm.execute
response.Write("修改成功!")
conn.close
set conn=nothing
%>
页面上已经可以显示修改成功了,但是数据不能被修改!
代码是这样的
<%
dim Name1,Price1
Name1=request.Form("name")
Price1=request.Form("price")
session
dim conn
set conn=server.createobject("adodb.Connection")
conn.connectionString="Dbq=C:\Inetpub\wwwroot\canting.mdb;Driver={Microsoft Access Driver (*.mdb)}"
conn.mode=0
conn.open
dim comm
set comm=server.CreateObject("adodb.Command")
comm.ActiveConnection=conn
comm.commandtype=1
dim sqlstr
sqlstr="update caipu set name='"&Name1&"',price='"&price&"' where number="& CInt(Request("number"))
comm.commandtext=sqlstr
set rs=comm.execute
response.Write("修改成功!")
conn.close
set conn=nothing
%>
页面上已经可以显示修改成功了,但是数据不能被修改!