请大家指点一下小弟,谢谢。。

iamnotyou 2003-09-25 12:57:50
我有个FTP空间,试了好几种留言板,可是数据库总出错。。

如:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

[Microsoft][ODBC Microsoft Access Driver] 操作必须使用一个可更新的查询。

/lovejjh/test/guest/write.asp,行53


请问这是怎么回事呀?
...全文
102 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
iamnotyou 2003-09-25
  • 打赏
  • 举报
回复
高手门帮帮忙啊。
iamnotyou 2003-09-25
  • 打赏
  • 举报
回复
我刚才在网上查,,说可能是数据库权限的问题//不知道是不是//

路径都对,可以从数据库里读东西,可是一写就出错。
itcoco 2003-09-25
  • 打赏
  • 举报
回复
Connections.asp ,write.asp ,数据库文件的路径都对么?
itcoco 2003-09-25
  • 打赏
  • 举报
回复
你的ftp支持access么?
strSql = StrSQl & title & "', '"
要不大小写统一?
sql语句中类型匹配么?
别的我也想不出原因了
iamnotyou 2003-09-25
  • 打赏
  • 举报
回复
TO 无忧草

insert into guestbook (laccess,username,head,ip,email, home,face,occation,qq,title,content) Values ('','feee','icon/1.gif','61.12.209.222','asd@sina.com','asdasdas', 'images/20.gif', 'adsadsa', '464664', 'asssssssssssss', 'sdddddddddddddddddd')

应该没问题吧
iamnotyou 2003-09-25
  • 打赏
  • 举报
回复
to 大飞

用你的语句时候出现错误:
Microsoft JET Database Engine 错误 '80004005'

操作必须使用一个可更新的查询。

/lovejjh/test/guest/write.asp,行53
itcoco 2003-09-25
  • 打赏
  • 举报
回复
你的sql语句response.write(sql)测试以下对否
dafei0320 2003-09-25
  • 打赏
  • 举报
回复
试试这个吧!
<%
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
cnpath="data source=" & server.MapPath("地址")
conn.open "provider=microsoft.jet.oledb.4.0;" & cnpath
%>
iamnotyou 2003-09-25
  • 打赏
  • 举报
回复
write.asp 的前一部分

<%@ CODEPAGE = "936" %>
<!--#include file="Connections.asp" -->
<!--#include file="ubb.js" -->
<!--#include file="top.asp" -->
<%
if request.querystring("action")="add" then
laccess=Request.Form("laccess")
username=Request.Form("username")
email=Request.Form("email")
qq=Request.Form("qq")
address=Request.Form("Address")
home=Request.Form("home")
face=Request.Form("face")
title=Request.Form("title")
head=Request.Form("head")
ip=Request.Form("ip")
content=Request.Form("f3_content")
action="ture"
if username="" then
error1="用户不能为空<BR>"
action="false"
end if
if title="" then
error1=error1&"标题不能为空<BR>"
action="false"
end if

if content="" then
error1=error1&"内容不能为空<BR>"
action="false"
end if
if len("content")>total then
error1=error1&"内容超过了"&total&"的限制"
action="false"
end if
if action="false" then

response.redirect("?action=error&error1="&error1&"")
else
strSql = "insert into guestbook (laccess,username,head,ip,email, home,face,occation,qq,title,content) Values ('"
strSql = StrSQl & laccess & "','"
strSql = StrSQl & username & "','"
strSql = StrSQl & head & "','"
strSql = StrSQl & ip & "','"
strSql = StrSQl & email & "','"
strSql = StrSQl & home & "', '"
strSql = StrSQl & face & "', '"
strSql = StrSQl & address & "', '"
strSql = StrSQl & qq & "', '"
strSql = StrSQl & title & "', '"

strSql = StrSQl & content & "')"
conn.Execute (strsql)
response.redirect"index.asp"
response.end

end if
elseif request.querystring("action")="" then
%>

iamnotyou 2003-09-25
  • 打赏
  • 举报
回复
Connections.asp

<%
feiyudbq="mdb/guestbook.asp" '若你改了数据库文件名,请更改此处连接,注意应为相对路径,若不懂相对路径的,请按照原格式修改
connstr="DBQ="+server.mappath(""&feiyudbq&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr


%>
itcoco 2003-09-25
  • 打赏
  • 举报
回复
code贴出来帮你看看

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧