请教高手,如何一次写入多条纪录
代码如下:如在title字段,输入张三,李四 会像数据库中写入两条纪录,一条是张三一条是李四
<!--#include file="conn.asp"-->
<%
if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from soft",conn,1,3
rs.addnew
rs("title")=trim(request("title"))
rs("title2")=trim(request("title2"))
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('添加成功!');window.location.href='../print01-1.asp';</script>"
response.End
end if
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<form name="form1" method="post" action="add01.asp?action=save" >
<tr bgcolor="#F1F1F1">
<td width="25%" height="30" bgcolor="#CCCCCC" ><div align="center">姓名:</div></td>
<td width="54%" bgcolor="#CCCCCC" ><div align="center">
<input name="title" type="text" id="title" size="30">
</div></td>
<td width="54%" bgcolor="#CCCCCC" ><div align="center"> 部门:</div></td>
<td width="54%" bgcolor="#CCCCCC" ><div align="center">
<input name="title2" type="text" id="title2" size="30">
</div></td>
<td width="21%" bgcolor="#CCCCCC" ><div align="center">
<input type="submit" name="Submit" value=" 添 加 " >
</div></td>
</tr>
</form>
</table>