update news set news_title='sd',news_author='sdf',news_content='sdf',news_date='2004-8-2 1:25:17' where news_ID=21
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e10'
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1
...全文
14416打赏收藏
参数不足,期待是 1 ??????
update news set news_title='sd',news_author='sdf',news_content='sdf',news_date='2004-8-2 1:25:17' where news_ID=21 Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e10' [Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1
可能是类型不匹配!我刚回完贴,就碰见这个问题了,
if Request("type")="" then
Response.Write "<script>alert(""参数出错!!"")</script>"
Response.Write "<script>history.back()</script>"
Response.End
end if
Set rs=Server.CreateObject("adodb.recordset")
sql="select * from NewsSafe where type="&Request("type")//这个传递值不能这么写
rs.open sql,conn,1,3
if rs.eof or rs.bof then
%>
我改称这样就可以了
if Request("type")="" then
Response.Write "<script>alert(""参数出错!!"")</script>"
Response.Write "<script>history.back()</script>"
Response.End
end if
Set rs=Server.CreateObject("adodb.recordset")
sql="select * from NewsSafe where type='"&Request("type")&"'"
rs.open sql,conn,1,3
if rs.eof or rs.bof then
%>
楼主可以检查一下你的类型是否对应
sql="update news set news_title='sd',news_author='sdf',news_content='sdf',news_date='2004-8-2 1:25:17' where news_ID=21"
rs.open sql,conn,1,3
这样应该可以,应该是后面的参数1,3没有加~~
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access 97 Driver]
Too few parameters.Expected 1.
原因
出现此错误是因为您在查询语法中使用了不存在的列名。通常,此错误只不过是一个拼写错误。将数据库中的列名与查询字符串进行对比检查。如果使用的是 Microsoft Access,请确保使用的是实际的列名,而不是列的“显示”名称。
可能原因前面都说了,最主要可能有以下几点:
1.conn.execute(sql)
2.sql="update news set news_title='sd',news_author='sdf',news_content='sdf',news_date='#2004-8-2 1:25:17#' where news_ID=21"
3.conn.asp没include