在线等 你一定知道怎么帮我
数据库文件在data文件夹里是db.mdb 表是xinxi
我想把 书写一些信息 提交到表里 并在页面上显示成功 就出问题了 我只有这一个页面 刚开始学
求助 谢谢
我的代码:
<%
Set Con=Server.CreateObiect( "ADODB.connection ")
Con.Open= "DRIVER={Microsoft Acess Driver(*.mdb)};DBQ= "+Server.MapPath( "./data/db.mdb ")
action=trim(Request( "action "))
xm=trim(Request( "xm "))
sheng=trim(Request( "sheng "))
shi=trim(Request( "shi "))
xz=trim(Request( "xz "))
cun=trim(Request( "cun "))
mph=trim(Request( "mph "))
yb=trim(Request( "yb "))
gzdw=trim(Request( "gzdw "))
lxdh=trim(Request( "lxdh "))
dzyx=trim(Request( "dzyx "))
if action= "index " then checkpass=true
if len(xm) <1 then checkpass=false
if len(sheng) <1 then checkpass=false
if len(shi) <1 then checkpass=false
if len(xz) <1 then checkpass=false
if len(cun) <1 then checkpass=false
if len(yb) <1 then checkpass=false
if len(gzdw) <1 then checkpass=false
if len(lxdh) <1 then checkpass=false
if len(dzyx) <1 then checkpass=false
Set Rs=Server.CreateObiect( "ADODB.Connection ")
query= "select xm from xinxi where xm= ' "+xm+ " ' "
Rs.Open query Con,1,1
if Rs.EOF Then checkpass=Ture
Else checkpass=Fasle
End If
if checkpass then
query= "inset into xinxi(xm, "
query=query+ "sheng, "
query=query+ "shi, "
query=query+ "xz, "
query=query+ "cun, "
query=query+ "mph, "
query=query+ "yb, "
query=query+ "gzdw, "
query=query+ "lxdh, "
query=query+ "dzyx, "
Con.Execute query
Response.Redirect "index.asp "
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " >
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 订购页面 </title>
<style type= "text/css ">
<!--
.style7 {
font-size: xx-large;
font-weight: bold;
}
.style11 {font-size: 18px}
-->
</style>
</head>
<body>
<table width= "684 " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr bgcolor= "#669999 ">
<td height= "64 " colspan= "2 "> <div align= "center "> <span class= "style7 "> 订购人信息 </span> </div> </td>
</tr>
<tr>
<td width= "143 " &n