Native DB V360 - The developped code unit uses Access Automation Control to create periodically an Access DB.
On the server, the Code Unit runs perfectly when started from the Client (CLIENT.EXE and Run by Object Designer).
When started from an NAS (NAS.EXE) the Access Automation Control doesn't work. The Event Log shows an event like - can not create an instance of ACCESS.APPLICATION - ...check Registry ...
Can you explain what happens, what is the difference related to the registry entry of the automation control, between a code unit started from the client or started from NAS. (even when the client is started on the DB server or on another PC it works).
TIA for all information,
Louis - best wishes for 2006[/u]
0
Comments
RIS Plus, LLC
Here is a piece of C/AL :
Any idea ?
Does Provider requires something on the server ? ("Microsoft.Jet.OLEDB.4.0")
Louis
RIS Plus, LLC
There is no visual problem. On my PC there is no problem to run the DB Server and an NAS Server. In this environment everything is OK - the MDB file is created by the running NAS. The problem occurs only on the PROD DB Server installation. This is the mystery !
Louis
RIS Plus, LLC
I don't know. What is sure... is that's a problem
Of course the PROD machine doesn't have the same permission rights as mine. But the event log talk about a problem of Instanciation of the automation control - not about permissions. I have tried to create the MDB file on C:/Temp on the server - the result is the same in the event viewer.
Louis
The component is not know, which we have eliminated, since Access is installed on the NAS machine.
There is something wrong with the object itself, like it tries to create one when it already has one in memory. That's what I am trying to prevent with the code above, where it makes sure that it clears the object before creating it.
Then, there could be something wrong with a parameter, like a connection string. That could be a problem if the user that is set up to run NAS does not have permissions to open the connection.
Could you copy the exact message into a reply?
RIS Plus, LLC
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The exact event description when the NAS is running :
This message is for C/AL programmers:
Could not create an instance of the OLE control or Automation server identified by GUID=...etc :Microsoft Access Object library.Application
(which doesn't really show permission problem...)
Effectively the task manager shows multiple instances of crashed--MSAccess.exe --
On my PC it is running on my Account (Log on as "My Account").
How to test/debug if the NAS account can run Access ?
Louis
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
If that i not the problem, then either you are not calling the automation correctly, or there must be some sort of visual component in the Application object that NAS can't handle.
RIS Plus, LLC
The office automation objects are not thread safe and were never intended to be run in a service environment. To do so is asking for trouble. This applies everywhere, not just in Navision.
I would make a template access database. Have a scheduled task that first copies this template version to a new file and then use ODBC to pump the data into it. If you have SQL Server there, you can use DTS to do this quite easily.
No good could come of automating Access on your server.
Dave