熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp +access 數據保存插入代碼

2013-11-13 10:43:01  來源: .NET編程 

  asp教程 +access 數據保存插入代碼
if requestQueryString("ag")  then
 set conn=servercreateobject("adodbconnection")
 connopen "driver={microsoft access driver (*mdb)};dbq="&servermappath("/skyjmdb")
 ag=requestform("ag")
 amount=requestform("amount")
 name=requestform("name")
 tel=requestform("tel")
 email=requestform("email")
 QQ=requestform("QQ")
 bolg=requestform("bolg")
 blank=requestform("blank")
 exec="insert into 訂單(訂單數量人名電話EmailQQ博客銀行卡號)values("+ag+""+amount+""+name+""+tel+""+email+""+QQ+""+bolg+""+blank+")"
 connexecute exec
 connclose
 set conn=nothing
end if
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE=""%>
<!DOCTYPE html PUBLIC "//WC//DTD XHTML Transitional//EN" "
<html xmlns="
<html>
<head>
<title>asp +access 數據保存插入代碼</title>
<meta httpequiv="ContentType" content="text/html; charset=gb">
</head>

  <body bgcolor="#FFFFFF" text="#">
<form name="form" method="post" action="//exampleasp">
  <table width="%" border="">
    <tr>
      <td>產品
      <input type="text" name="ag"  value="">      </td>
      <td>數量 (斤)
      <input type="text" name="amount" value=""></td>
      <td>姓名
        <input type="text" name="name" value=""></td>
      <td>電話
         <input type="text" name="tel" value=""></td>
      <td>Email
         <input type="text" name="email" value=""></td>
      <td>QQ
         <input type="text" name="QQ" value=""></td>
      <td>博客<input type="text" name="bolg" value=""></td>
      <td>銀行卡號<input type="text" name="blank" value=""></td>
    </tr>
  </table>
  <br>
  <br>
  <br>
  <input type="submit" name="Submit" value="提交">
  <input type="reset" name="Submit" value="重置">
 
</form>
<br>
</body>
</html>
 

  
 


From:http://tw.wingwit.com/Article/program/net/201311/14361.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.