找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 191|回复: 3

这是哪里出了问题啊?

[复制链接]
发表于 2010-1-17 02:52:34 | 显示全部楼层 |阅读模式 IP:江苏扬州
我的这段写入ACCESS的代码到底是哪里出错了啊?为什么只有product,productn两个字段是写得进去的?
<%
if request.querystring("action")="checkdd_cn" then

companyname=request("tcompanyname")
customername=request("tcustomername")
tcustomersex=request("tcustomersex")
tcustomertel=request("tcustomertel")
tcustomeremail=request("tcustomeremail")
tproduct=request("tproduct")
tproductn=request("tproductn")
tspdate=request("tspdate")

set rs=server.createobject("adodb.recordset")
sqlstr="select * from byh_customer"
rs.Open sqlstr,conn,3,3
rs.addnew
rs("ccompany")=companyname
rs("cname")=customername
rs("csex")=tcustomersex
rs("ctel")=tcustomertel
rs("cemail")=tcustomeremail
rs("product")=tproduct
rs("productn")=tproductn
rs("交货日期")=tspdate
rs("填单日期")=now()
rs.update
rs.close
set rs=nothing
set conn=nothing
%>

<script language=vbscript>
msgbox "提交成功!"
window.location="wsdd_cn.asp"
</script>
<%end if%>

<head>
<title><%=byh_site_name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="<%=byh_site_key%>">
<LINK href="style.css" type=text/css rel=stylesheet>
</head>
<body background="kl_image/topbg.jpg">
<!--#include file="top_cn.asp"-->

<TABLE width=778 height=490 border=0 align="center" cellPadding=0 cellSpacing=0 id=table1>
<TBODY>
<TR>
<TD vAlign=top align=middle width=778>

<TABLE id=table23 height=198 cellSpacing=0 cellPadding=0 width=778
border=0>
<TBODY>
<TR>
<TD align=middle width=180 rowSpan=4 height="55"> <!--#include file="left_cn.asp"--> </TD>
<TD width=598 colSpan=3 height=34> <P align=center><FONT color=#cc3300 size=3>
网上订单</FONT></P></TD>
</TR>
<TR>
<TD vAlign=top width=598 colSpan=3 height=12></TD>
</TR>
<TR>
<TD width=68 height="33"></TD>
<TD vAlign=top width=462 height="33">

<form method="POST" action="?action=checkdd_cn">
<%
tcompanyname=request("companyname")
tcustomername=request("customername")
tcustomersex=request("customersex")
tcustomertel=request("customertel")
tcustomeremail=request("customeremail")
tproduct=request("product")
tproductn=request("productn")
tspdate=request("spdate")

if tcompanyname ="" then%>
<script language="vbScript">msgbox "对不起,公司名不能为空!"
window.history.go(-1)
</script>
<% response.End()
end if
if tcustomername ="" then%>
<script language="vbScript">msgbox "对不起,用户名不能为空!"
window.history.go(-1)
</script>
<%response.End()
end if

if tcustomertel ="" then%>
<script language="vbScript">msgbox "对不起,电话号码不能为空!"
window.history.go(-1)
</script>
<%response.End()
end if
if tproduct ="" then%>
<script language="vbScript">msgbox "对不起,产品型号不能为空!"
window.history.go(-1)
</script>
<%response.End()
end if
if tproductn ="" then%>
<script language="vbScript">msgbox "对不起,定做数量不能为空!"
window.history.go(-1)
</script>
<%response.End()
end if

if tspdate ="" then%>
<script language="vbScript">msgbox "对不起,交货日期不能为空!"
window.history.go(-1)
</script>
<%response.End()
end if

%>
<p>您填写的内容是:</p>
<table border="1" width="50%" height="142">
<tr>
<td width="50%" height="12">公司名称:</td>
<td width="50%" height="12"><%=tcompanyname%> <input type=hidden name=tcompany value=<%=tcompanyname%>></td>
</tr>
<tr>
<td width="50%" height="10">客户姓名:</td>
<td width="50%" height="10"><%=tcustomername%> <input type=hidden name=tname value=<%=tcustomername%>></td>
</tr>
<tr>
<td width="50%" height="12">性别:</td>
<td width="50%" height="12"><%=tcustomersex%><input type=hidden name=tsex value=<%=tcustomersex%>></td>
</tr>
<tr>
<td width="50%" height="12">联系电话:</td>
<td width="50%" height="12"><%=tcustomertel%><input type=hidden name=ttel value=<%=tcustomertel%>></td>
</tr>
<tr>
<td width="50%" height="12">E-mail:</td>
<td width="50%" height="12"><%=tcustomeremail%> <input type=hidden name=temail value=<%=tcustomeremail%>></td>
</tr>
<tr>
<td width="50%" height="12">产品型号:</td>
<td width="50%" height="12"><%=tproduct%><input type=hidden name=tproduct value=<%=tproduct%>> </td>
</tr>
<tr>
<td width="50%" height="12">定做数量:</td>
<td width="50%" height="12"><%=tproductn%><input type=hidden name=tproductn value=<%=tproductn%>></td>
</tr>
<tr>
<td width="50%" height="12">交货日期:</td>
<td width="50%" height="12"><%=tspdate%><input type=hidden name=tjhrq value=<%=tspdate%>></td>
</tr>
</table>


<p><input type="submit" value="确定" name="B3" ><input type="button" onclick="window.location.href='wsdd_cn.asp'" value="返回重写" name="B2" ></p>
</form>
</TD>
<TD width=68 height="33"> </TD>
</TR>
<TR>
<TD vAlign=top width=598 colSpan=3 height=1> </TD>
</TR>
<TR>
<TD width=180 height=143 rowSpan=3> </TD>
<TD vAlign=top width=598 colSpan=3 height=105> 
<HR SIZE=1> <FONT size=2><BR>
</FONT><FONT
size=2 ><%=byh_site_copyright%></FONT>
<P align=center><BR>
<FONT size=2><FONT
color=#ff3333>白永浩设计</FONT>制作维护&nbsp; <A
href="mailto:ssd858@126.com">ssd858@126.com</A></FONT></P></TD>
</TR>
<TR>
<TD vAlign=top width=598 colSpan=3 height=21> <HR SIZE=1> </TD>
</TR>
<TR>
<TD vAlign=top width=598 colSpan=3 height=17> <P align=center>&copy;
</P></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
</body>
发表于 2010-1-17 02:52:38 | 显示全部楼层 IP:江苏扬州
你先把参数都打印出来看看是否都有,如果都有就看下字段设置的长度符合不符合
回复

使用道具 举报

发表于 2010-1-17 02:52:42 | 显示全部楼层 IP:江苏扬州
把错误的代码贴出,不要把整个代码都贴出
错误的地方可能就在某一行
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 13:19 , Processed in 0.338299 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表