asp添加数据库表,insert into为什么老是错误

来源:百度知道 编辑:UC知道 时间:2024/06/16 01:34:43
<html><style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 {font-size: 36px}
.STYLE3 {font-size: 18px}
-->
</style>
<span class="STYLE1">添加文章</span>
<hr>
<form name="form1" method="post" action="tianjia.asp">
<label>标题:
<input type="text" name="name">
</label>
</p>
<p>
<label>内容:<br />

<textarea name="neirong" rows="10" id="nl"></textarea>
</label>
</p>
<p align="left">  </p>
<p>
<label>上传日期:
<input type="text" name="date">
</label>

你把name,date加个[]试试,因为保留字和关键字都要加[]括起来的,还有就是别插入备注型的数据。

我也遇到过这个问题,INSERT INTO是完全正确的,在ACCESS是也能成功执行,后来的解决办法是:去掉表中的ID字段,用
strq = "insert into sddb values "
strq =strq & "('" & strxm & "','" & strnl & "','" & strdh & "')"
你试一试,要是ID是不可少的话,你用rs.addnew试试

你可以把sql语句response.write出来放到数据库里面试试看具体是什么错误