谁能帮我看看这段写入到数据库的代码哪里错了?

来源:百度知道 编辑:UC知道 时间:2024/05/28 07:24:45
<!--#include file="ADOFunctions.inc" -->
<%
sql1="select * from liuyan"
set objrs=conn.execute(sql1)
%><title>发表留言</title>
<table width="790" height="425" border="0" align="center">
<tr>
<td align="center"><form name="form1" method="post" action="xsly.asp">
<p>您的姓名:
<input name="x" type="text">
</p>
<p>发表时间:
<input name="f" type="text">
</p>
<p>您的Email:
<input name="e" type="text">
</p>
<p>留言标题:
<input name="b" type="text">
</p>
<p>留言内容:
<textarea name="n"></text

并不是所以字段都是字符串型的,请注意一下!如果不是请转换一下类型!

用强制转换转换一下!或使用这种方式:
‘#1980-12-21’就是日期形式!或者是用这个函数CTOD(“1980-12-15”)CTOD是SQL中的转换函数,意思是char to date!明白了吗?