all groups > inetserver asp db > july 2003 >
You're in the

inetserver asp db

group:

Access denied when creating Access application object


Re: Access denied when creating Access application object Ray at <%=sLocation%
7/31/2003 12:30:25 AM
inetserver asp db:
What kind of data are you trying to access from the database? Records? If
so, use ADO. Also, as many will probably tell you, using Office
applications on Web servers is il-advised, per Microsoft.

Ray at home

--
Will trade ASP help for SQL Server help


[quoted text, click to view]

Access denied when creating Access application object Bill Murphy
7/31/2003 4:02:29 AM
In an ASP file I am running the following in VBScript in order to extract
data from an Access 2002 MDB file which is physically located in the virtual
directory in PWS along with the ASP file:

dim objAccess
set objAccess = Server.CreateObject("Access.Application")

When the second line executes I am getting error "ASP 0178 -
Server.CreateObject Access Error. The call to Server.CreateObject failed
while checking permissions. Access is denied to this object."

I have Access 2002 installed on the same Windows 2000 Professional PC as the
Personal Web Server and the virtual directory for the ASP file.

I would appreciate any thoughts on why access is denied.

Bill

Access denied when creating Access application object John Beschler
7/31/2003 8:17:22 AM
Bill,

Here is a page that tells how to create connections to
various databases (including access). AS someone has
already mentioned, you do not need Access on the server to
retrieve data from access tables. Therefore, you do NOT
need to create an "Access.Application"


http://www.aspfaq.com/show.asp?id=2126

EXAMPLE: (VBCsript)
Dim szConn, objConn, objRS, szSQL
szConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
szConn = szConn & server.mappath("/<pathtofile.mdb>")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open szConn
szSQL = "SELECT Lname, Fname, MI, SSAN " _
& " FROM Employees " _
& " WHERE TermDate IS NULL "
Set objRS = objConn.Execute szSQL

At this point you have a recordset which contains the data
requested from your table.

HTH,
John


[quoted text, click to view]
Re: Access denied when creating Access application object John Beschler
7/31/2003 10:28:51 AM
To the best of my knowledge, there is no way to use MS
Access reports on the web.

I must reiterate MS recommendations about using Office
Automation on the server. The company that developed our
IntraNet application used office automation extensively
and it is a major PITA.

In any case, I doubt you'll get much help implementing
Office Automation from this newsgroup.

If you need to do web reporting of your data, look at
Crystal Reports. (www.crystaldecisions.com) It supports
most popular databases (including MS Access).

HTH,
John

[quoted text, click to view]
Re: Access denied when creating Access application object raydan
7/31/2003 1:37:58 PM
Crystal Reports is one, although I have never used it.

I have built reports in Excel accessing data in an SQL Server database on a
host server.
Schools use this to acces and print out report cards and class lists.
No problem doing this for an Access database.
This is done completely outside the web site, all users must have Excel and
you must distribute the application.
This could probably also be done the same way with an Access application and
the same conditions would apply (all users must have Access installed).

That's one problem with Web pages. Report writing is a pain and the results
look "Yucky" at best.

[quoted text, click to view]

Re: Access denied when creating Access application object Bill Murphy
7/31/2003 4:56:31 PM
I've read the various Microsoft Knowledgebase white papers stressing the
fact that Microsoft does not recommend running any Office application,
including Access, in an automation mode. Risky and unstable, potential for
crashing the Web server.

One of my goals with the application I am working on is to allow the user to
input some parameters, for example a begin date and an end date, and view a
report using data from an Access MDB on screen, with an option to print the
report. If I just connect to the Access tables using ADO this will provide
the data, but are there reporting packages available that will display the
data in reports as described above? I like the report designer in Access,
but apparently this cannot be used unless Access is started under
automation.

Bill


[quoted text, click to view]

AddThis Social Bookmark Button