G
Geoff
Hi, all
I am automating Access 2003 (Server) from another Access 2003 DB (Client).
Depending upon the existence of some objects in the Server DB, the Client
VBA will receive the error:
"-2147417851 - Automation error
The server threw an exception."
I have looked around, and see that this error has cropped up in discussions
before.
My error handler checks for this error code, and resumes succesfully.
The issue I am finding difficult to handle is that if the server throws an
exception, then the process of closing the server fails silently at the end
of the client function, leaving an instance of MSACCESS.EXE running in
memory, but not visible - even if the server is made visible when it is
being used!
The code is:
Set oAccess = New Access.Application
oAccess.OpenCurrentDatabase "C:\Test.mdb"
' do some automation things here....
' cause the "-2147417851 - Automation error. The server threw an
exception."
oAccess.CloseCurrentDatabase
oAccess.Quit
Set oAccess = Nothing ' <-- after "-2147417851 - Automation error - this
does not end the MSACCESS Server process.
My question is:
Is there a way to ensure the server instance is properly closed?
I am automating Access 2003 (Server) from another Access 2003 DB (Client).
Depending upon the existence of some objects in the Server DB, the Client
VBA will receive the error:
"-2147417851 - Automation error
The server threw an exception."
I have looked around, and see that this error has cropped up in discussions
before.
My error handler checks for this error code, and resumes succesfully.
The issue I am finding difficult to handle is that if the server throws an
exception, then the process of closing the server fails silently at the end
of the client function, leaving an instance of MSACCESS.EXE running in
memory, but not visible - even if the server is made visible when it is
being used!
The code is:
Set oAccess = New Access.Application
oAccess.OpenCurrentDatabase "C:\Test.mdb"
' do some automation things here....
' cause the "-2147417851 - Automation error. The server threw an
exception."
oAccess.CloseCurrentDatabase
oAccess.Quit
Set oAccess = Nothing ' <-- after "-2147417851 - Automation error - this
does not end the MSACCESS Server process.
My question is:
Is there a way to ensure the server instance is properly closed?