开发者

Error on Access database: Permission denied: 'CreateObject'

开发者 https://www.devze.com 2023-02-02 21:13 出处:网络
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 wan

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...开发者_如何学C

<%
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.


How about:

Server.CreateObject("Persits.Upload")


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消