From: Alan R. Johns <alan@graphicsuniversal.com>
To: pgsql-odbc@postgresql.org
Subject: Access 2002/PostgreSQL ODBC Inactivity
Date: Fri, 4 Oct 2002 13:07:20 -0400
Message-ID: <NEBBJIECOLDILFFDGNMNOEHDCPAA.alan@graphicsuniversal.com> (raw)
This issue has been discussed briefly before: Using Access 2002 with
PostgreSQL ODBC v7.2.3 (or any version for that matter) after a period of
inactivity, Access will crash with either:
"Faulting application msaccess.exe, version 10.0.4302.0, faulting module
unknown, version 0.0.0.0, fault address 0x0000176d."
OR
When you try to close the forms you'll get an endless "This action will
reset the current code in break mode.". The only way out of Access is to
terminate the process.
I've been continuing to research this problem. I found some messages from
people using MySQL ODBC having the exact same problem. One guy suggested
changing the ODBC connection timeout in the registry:
Go to :
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\ODBC]
Set:
ConnectionTimeout = 0
0 means never disconnect. I know this is probably not a recommended setting,
but it has solved my problem thus far.
The default registry setting is 600 (10 minutes). I experimented setting it
to 10 seconds and turning on CommLog and Mylog in the ODBC driver. After
approximately one minute of inactivity, I was almost guaranteed Access would
crash. This seems to be the key to what causes Access 2002 to crash. When
Access drops the connection with the server and then tries to reestablish it
(when activity resumes), it inevitably crashes. I've attached a small
portion of the commlog, but it really just shows nothing more than the ODBC
driver reestablishing the connection and returning 10 rows. MyLog shows
nothing out of the ordinary either.
Another possible solution is to lower the ODBC Refresh Interval
(Options-Advanced) to a number lower than the registry's connect timeout.
However, I have STILL had Access crash on me in this situation.
Obviously, Access is the problem here. I'm not suggesting there is anything
wrong with the PostgreSQL ODBC driver. I'm just trying to provide some
information for others who may run into this problem.
BTW:
I'm using the latest Office XP SP2 for Access. The OS doesn't seem to
matter. I've seen it crash on Win98, 2000 SP2, and XP SP1.
Access 2000 does not seem to have this problem at all. I'd be happy to
downgrade to 2000, but I've already created my app with many of the enhanced
printing functions in 2002.
Anyone else have any other suggestions? (Besides getting rid of Access <G>)
-Alan
Attachments:
psqlodbc.log (application/octet-stream, 3.1K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: alan@graphicsuniversal.com
Subject: Re: Access 2002/PostgreSQL ODBC Inactivity
In-Reply-To: <NEBBJIECOLDILFFDGNMNOEHDCPAA.alan@graphicsuniversal.com>
References: <NEBBJIECOLDILFFDGNMNOEHDCPAA.alan@graphicsuniversal.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox