数据库如何能修改

来源:百度知道 编辑:UC知道 时间:2024/05/30 01:16:00
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("shi.mdb")
exec="select * from shi where id="&request.form("id")
set rs=server.createobject("adodb.recordset")
rs.open exec,conn
%>
<form name="form1" method="post" action="modifysave.asp">
<table width="748" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>name</td>
<td>tel</td>
<td>message</td>
</tr>
<tr>
<td>
<input type="text" name="name" value="<%=rs("name")%>">
</td>
<td>
<input type="text" name="tel" value="<%=rs("tel")%>">
</td>

显示参数不足的话就是你提交的参数个数或者类型和你数据库的表里面的参数的个数或者类型不匹配,另外还要注意一下参数的顺序不要乱

rs.open exec,conn 改为rs.open exec,conn,1,3

modifysave.asp是要执行的文件么?