It's really pretty simple: monitor for the error in your Access
application. When the error is encountered, close the connection, wait
some time, and then open the connection again.
This is not something you usually have to do in Access as starting
Access and referencing a database (MS access file) will automagically
create all the connections for linked tables. You'll have to do some
investigating in the Access or Application object to find the place to
put the monitor.
Last time I looked at Access code, it was all VBA. That means a monitor
was OnError. You can probably now use try/catch blocks.
No examples for you, I'm afraid. Too many employers since I did one of
those. Maybe someone else has one.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mant, Phil
Sent: Wednesday, February 03, 2010 5:16 PM
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: Re-start iSeries Access ODBC connection from MS Access
Hopefully someone on this list can help me out. I have developed an MS
Access database that is linked to a DB2 table on the iSeries. Every 15
minutes the Access Database displays a form with a pie chart that is
generated from the table on the iSeries. The problem is that the iSeries
system shuts down every night for a system backup. This causes an ODBC
error for MS Access and the application has to be restarted. If possible
I would like to avoid having to restart the MS Access application. I
have attempted to find out what code is required to re-start the ODBC
connection, but so far I have been unsuccessful in my search. Does
anyone have any code examples that would accomplish this for me?
Thanks,
Phil.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.