Access 数据库错误:权限被拒绝:“CreateObject”

发布于 2024-10-09 20:47:28 字数 1112 浏览 0 评论 0原文

我正在将网站迁移到新服务器,它采用 ASP 并使用多个 Access 数据库,该网站和 CMS 可以读取、显示数据,甚至编辑和更新现有数据条目,但是当我想添加新条目时,我收到错误...

Microsoft VBScript 运行时错误“800a0046”

权限被拒绝:“CreateObject”

/padp2010d/ads_tradetracker.asp,第 11 行

数据库上似乎没有密码,我已经设置并测试了 ODBC 数据源,它们工作正常。

导致问题的代码或行是...

<%
Dim Mail, strPath, strHost, Upload

Set Upload = CreateObject("Persits.Upload")
Upload.IgnoreNoPost = True

' Generate unique names 
Upload.OverwriteFiles = False
' Limit file size to 500000 bytes
Upload.SetMaxSize 500000, True

' capture an upload and save uploaded files (if any) in temp directory
Upload.SaveVirtual "\pa\images\advertenties"
Upload.Save

' Use session ID as the new file name
NewName = Session.SessionID

第 11 行是 Set Upload = CreateObject("Persits.Upload")

如果有人可以提供帮助,那就太好了。可能是权限设置吗?

我对 ASP 和 Access 完全是新手!

谢谢

我已经尝试了下面的答案,但我仍然收到错误......

服务器对象错误 ASP 0178:80070005 Server.CreateObject 访问错误 /padp2010d/ads_tradetracker.asp,第 11 行 检查权限时对 Server.CreateObject 的调用失败。对此对象的访问被拒绝。

I am migrating a website over to a new server, its in ASP and uses several Access databases, the site and CMS can read, display the data, and even edit and update existing data entries, but when I want to add a new entry, I get an error...

Microsoft VBScript runtime error '800a0046'

Permission denied: 'CreateObject'

/padp2010d/ads_tradetracker.asp, line 11

There seems to be no passwords on the databases, I have set up and tested the ODBC Data Sources and they are working fine.

The code or line that is causing the problem is...

<%
Dim Mail, strPath, strHost, Upload

Set Upload = CreateObject("Persits.Upload")
Upload.IgnoreNoPost = True

' Generate unique names 
Upload.OverwriteFiles = False
' Limit file size to 500000 bytes
Upload.SetMaxSize 500000, True

' capture an upload and save uploaded files (if any) in temp directory
Upload.SaveVirtual "\pa\images\advertenties"
Upload.Save

' Use session ID as the new file name
NewName = Session.SessionID

The line 11 is Set Upload = CreateObject("Persits.Upload")

If anyone could help that would be great. Could it be a Permission setting?

Im a complete novice with ASP and Access!

Thanks

I have tried the answer below but I still get an error...

Server object error ASP 0178 : 80070005
Server.CreateObject Access Error
/padp2010d/ads_tradetracker.asp, line 11
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无远思近则忧 2024-10-16 20:47:28

怎么样:

Server.CreateObject("Persits.Upload")

How about:

Server.CreateObject("Persits.Upload")
冰火雁神 2024-10-16 20:47:28

尝试使用 CreateObject("Persits.Upload", "localhost") 代替。我发现在某些情况下可选参数是必需的,但从未弄清楚何时需要的模式。

Try CreateObject("Persits.Upload", "localhost") instead. I've found that in some scenarios the optional argument is required, but have never figured out a pattern as to when.

夜唯美灬不弃 2024-10-16 20:47:28

我现在已经解决了问题,脚本工作正常,问题是服务器上的 AspUpload 组件的权限设置。非常感谢您的帮助。

I have now solved the problem, the script works fine, the problem was permission settings on AspUpload component on the server. Many Thanks for your help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文