ASP连接ACCESS数据库问题

lbmyslf000 2007-05-16 09:29:04
用ASP+ACCESS建的网站,在后台该东西的时候总是显示错误如下:


技术信息(用于支持人员)

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] 无法从指定的数据表中删除。
/admin/news_manage_update.asp, 第 12 行

到底是那里错误 请大家帮忙
...全文
208 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
lbmyslf000 2007-05-17
  • 打赏
  • 举报
回复
/admin/news_manage_update.asp 代码如下:

<!--#include file="session.asp"-->
<!--#include FILE="../inc/upload_5xsoft.inc"-->
<!--#include file="../inc/conn.asp"-->
<%
dim upload,file,formName,formPath,iCount
set upload=new upload_5xSoft ''建立上传对象
news_id=upload.form("news_id")
title=trim(upload.form("title"))
pic_internet=upload.form("pic_internet")
author=upload.form("author")
body=upload.form("body")
if title="" then
result=Server.urlEncode("新闻标题不能为空,请返回填写完整")
Response.Redirect"result.asp?result="&result
end if
if body="" then
result=Server.urlEncode("新闻内容不能为空,请返回填写完整")
Response.Redirect"result.asp?result="&result
end if
if pic_internet<>"http://" then
pic=pic_internet
end if
'Response.write title&radiopic&pic_internet&author&body&pic
'Response.End
set file=upload.file("pic_local") ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file_exs=split(file.FileName,".")
file_exname=file_exs(UBound(file_exs))
if not (file_exname<>"gif" or file_exname<>"jpg" or file_exname<>"jpg" or file_exname<>"bmp") then
result=Server.urlEncode("只能上传格式为gif,jpg或者bmp的图象,请返回")
Response.Redirect"result.asp?result="&result
end if
if file.FileSize/1024>900 then
result=Server.urlEncode("只能上传大小为900k以内的图象,请返回")
Response.Redirect "result.asp?result="&result
end If
file_name=year(now())&month(now())&day(now())&minute(now())&second(now())&"."&file_exname
file.SaveAs Server.mappath("\images\news_pic\"&file_name) ''保存文件
set file=nothing
set upload=nothing ''删除此对象]
pic="\images\news_pic\"&file_name '把文件名付给pic,准备存入数据库
end if
Set Rs=Server.CreateObject("Adodb.RecordSet")'保存到数据库
sql="select * from news where id="&news_id
Rs.Open sql,conn,3,3
Rs("title")=title
Rs("author")=author
Rs("pic")=pic
Rs("body")=body
Rs.Update
Rs.Close
Set Rs=nothing
Set conn=nothing
Response.Redirect"news_manage.asp"
%>
<html></html>
草原可可 2007-05-16
  • 打赏
  • 举报
回复
代码呢
tete 2007-05-16
  • 打赏
  • 举报
回复
1,权限问题
2,sql代码写得有问题
xiaoxiaodou 2007-05-16
  • 打赏
  • 举报
回复
对呀 代码贴出来才能知道哇。
dlink_cn 2007-05-16
  • 打赏
  • 举报
回复
news_manage_update.asp 的代码贴出来
小嘉茗的爸爸 2007-05-16
  • 打赏
  • 举报
回复
没贴代码怎么帮你看啊!晕死
zhengjay 2007-05-16
  • 打赏
  • 举报
回复
语句问题吧 发代码出来不就知道了
szxiaokang 2007-05-16
  • 打赏
  • 举报
回复
应该是sql 语句写错了

28,391

社区成员

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

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