孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

增加记录窗体为add.asp

<form name="form1" method="post" action="insert.asp">

<input type="submit" name="submit" value="增加">

.

.

.

</form>

在insert.asp中具体操作数据库

<!--include file="conn2.asp"-->

<%

name1=request("name")

pifa=CCur(request("pifa"))

danwei=request("danwei")

solArea=request("selArea")

lingshou=CCur(request("lingshou"))

number1=CInt(request("shuliang"))

set rs1=CreateObject("ADODB.RecordSet")

sql="select * from cailiao"

rs1.open sql,conn,1,3

rs1.addnew

rs1("name")=name1

rs1("Area")=selArea

rs1("danwei")=danwei

rs1("pifa")=pifa

rs1("lingshou")=lingshou

rs1.Update

rs1.Close

response.Redirect "add.asp"

%>

posted on 2008-09-18 19:32  孤独的猫  阅读(106)  评论(0编辑  收藏  举报