Print Page | Close Window

error in snapshot generating code (asp)

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=11229
Printed Date: 31 March 2026 at 11:59am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: error in snapshot generating code (asp)
Posted By: vinodkalpaka
Subject: error in snapshot generating code (asp)
Date Posted: 19 July 2004 at 1:30am

hi

i have a problem with devoloping an asp program ,that is  dynamically generating snapshot files (in .snp format)from

a MS-access database.
database name is datafile.mdb.
Report name is "reportTarge".
here is the asp code for this.


<%
    Dim objAccess
    Set objAccess = Server.CreateObject("Access.Application")
        objAccess.OpenCurrentDatabase request("APPL_PHYSICAL_PATH") & "databasename.mdb"
    objAccess.DoCmd.OutputTo 3, "reportName", "Snapshot Format (*.snp)", "snapshotname.snp", 0
    objAccess.DoCmd.Quit 2
%>

 

But while executing this asp code ,i am getting the following error in my IE browser.

Error Type:
Server object, ASP 0178 (0x80070005)
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.


What is the reason of this error (while creating instance of the access)?.
Is there any problem with my IIS server setting ?If there, how to solve it?

Please help me?
Thanking in advance.

From Vinod




Replies:
Posted By: WebWiz-Bruce
Date Posted: 19 July 2004 at 3:26am
The error means that the component you are trying to use is not installed on the server.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Mart
Date Posted: 19 July 2004 at 4:50am
I thought that meant your account doesn't have permission to use that component.


Posted By: WebWiz-Bruce
Date Posted: 19 July 2004 at 4:53am
Sorry your right, I just read the bit Server.CreateObject failed and as this was posted in the wrong forum, the Web Wiz Forums support forum, I'm use to seeing the failed message when the component is not installed on the web server when relating to support for Web Wiz Forums.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Mart
Date Posted: 19 July 2004 at 4:59am
To counter it make sure your account has administrative privileges, since you are executing an external program you need to have an administrative account on the server.


Posted By: michael
Date Posted: 19 July 2004 at 9:02am
Now that would be scary if you need admin privileges to execute an external program. All you need is explicit permissions to that  component. Access.Application is usually in the Office folder and the iusr account does not have permissions to there, or it's registry keys.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Mart
Date Posted: 19 July 2004 at 10:33am
Oh, I thought you needed admin rights because in .NET Office interop only works if you are logged in as an admin


Posted By: vinodkalpaka
Date Posted: 20 July 2004 at 2:35am
dear,

Thanks for you suggestions.That error is not appearing now ,but appering another error,

error '800a1eba'

if i trap the error with asp code

it shows the message

Microsoft Access can't open the database because it is missing, or opened exclusively by another user.

but this database is not opened elsewhere.
Is this the correct code for dynamically creating snapshots from asp.
If no ,please give help me.

Thank you

from,
Vinod




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net