Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C80DA4760F9 for ; Fri, 4 Oct 2002 13:07:27 -0400 (EDT) Received: from mail.graphicsuniversal.com (user194.net221.oh.sprint-hsd.net [65.173.85.194]) by postgresql.org (Postfix) with ESMTP id C9628476094 for ; Fri, 4 Oct 2002 13:07:26 -0400 (EDT) Received: from alanj ([100.0.1.200]) by mail.graphicsuniversal.com (Merak 4.4.2) with SMTP id LPB37351 for ; Fri, 04 Oct 2002 13:07:20 -0400 From: "Alan R. Johns" To: Subject: Access 2002/PostgreSQL ODBC Inactivity Date: Fri, 4 Oct 2002 13:07:20 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0022_01C26BA6.F904CDE0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/36 X-Sequence-Number: 2121 This is a multi-part message in MIME format. ------=_NextPart_000_0022_01C26BA6.F904CDE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 ) -Alan ------=_NextPart_000_0022_01C26BA6.F904CDE0 Content-Type: application/octet-stream; name="psqlodbc.log" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="psqlodbc.log" conn=3D225654800, query=3D'SELECT "rfq_no","rfq_rev","oldrfq","cust_code","= cust_name","address_1","address_2","city","state","zip","citystatezip","pho= ne","contact_name","contact_phone","sales_agent_name","csr_name","estimator= ","request_date","date_price_needed","proof_date","proof_check","delivery_d= ate","promise_check","hagen_quote_no","project_name",'#S_C_H#' ,"quot= e_type","qty_selection","qty1","qty2","qty3","qty4","qty5","price1","price2= ","price3","price4","price5","created_by","create_date","modified_by","modi= fied_date","xmin" FROM "tblrfq" WHERE "rfq_no" =3D '06475-1' OR "rfq_no" = =3D '06476' OR "rfq_no" =3D '06477' OR "rfq_no" =3D '06478' OR "rfq_no" =3D= '06479' OR "rfq_no" =3D '06480' OR "rfq_no" =3D '06481' OR "rfq_no" =3D '0= 6481-1' OR "rfq_no" =3D '06482' OR "rfq_no" =3D '06483'' [ fetched 10 rows ] conn=3D225654800, PGAPI_Disconnect Global Options: Version=3D'07.02.0002', fetch=3D100, socket=3D4096, unknown= _sizes=3D0, max_varchar_size=3D254, max_longvarchar_size=3D8190 disable_optimizer=3D1, ksqo=3D1, unique_index=3D1, use_decl= arefetch=3D0 text_as_longvarchar=3D1, unknowns_as_longvarchar=3D0, bools= _as_char=3D0 NAMEDATALEN=3D32 extra_systable_prefixes=3D'dd_', conn_settings=3D'' conn_en= coding=3D'OTHER' conn=3D235118600, query=3D' ' conn=3D235118600, query=3D'select version()' [ fetched 1 rows ] [ PostgreSQL version string =3D 'PostgreSQL 7.2.1 on i686-pc-linux-gnu,= compiled by GCC 2.96' ] [ PostgreSQL version number =3D '7.2' ] conn=3D235118600, query=3D'set DateStyle to 'ISO'' conn=3D235118600, query=3D'set geqo to 'OFF'' conn=3D235118600, query=3D'select oid from pg_type where typname=3D'lo'' [ fetched 1 rows ] [ Large Object oid =3D 1275589 ] conn=3D235118600, query=3D'select pg_client_encoding()' [ fetched 1 rows ] [ Client encoding =3D 'SQL_ASCII' (code =3D 0) ] conn=3D235118600, PGAPI_DriverConnect(out)=3D'DSN=3DRFQ;DATABASE=3DRFQ;SERV= ER=3DOrion;PORT=3D5432;UID=3Drfquser;PWD=3Dxxxxx;ReadOnly=3D0;Protocol=3D6.= 4;FakeOidIndex=3D0;ShowOidColumn=3D0;RowVersioning=3D1;ShowSystemTables=3D0= ;ConnSettings=3D;Fetch=3D100;Socket=3D4096;UnknownSizes=3D0;MaxVarcharSize= =3D254;MaxLongVarcharSize=3D8190;Debug=3D0;CommLog=3D1;Optimizer=3D1;Ksqo= =3D1;UseDeclareFetch=3D0;TextAsLongVarchar=3D1;UnknownsAsLongVarchar=3D0;Bo= olsAsChar=3D0;Parse=3D0;CancelAsFreeStmt=3D0;ExtraSysTablePrefixes=3Ddd_;LF= Conversion=3D1;UpdatableCursors=3D1;DisallowPremature=3D0;TrueIsMinus1=3D0;= BI=3D0' conn=3D235118600, query=3D'SELECT "rfq_no","rfq_rev","oldrfq","cust_code","= cust_name","address_1","address_2","city","state","zip","citystatezip","pho= ne","contact_name","contact_phone","sales_agent_name","csr_name","estimator= ","request_date","date_price_needed","proof_date","proof_check","delivery_d= ate","promise_check","hagen_quote_no","project_name",'#S_C_H#' ,"quot= e_type","qty_selection","qty1","qty2","qty3","qty4","qty5","price1","price2= ","price3","price4","price5","created_by","create_date","modified_by","modi= fied_date","xmin" FROM "tblrfq" WHERE "rfq_no" =3D '06484' OR "rfq_no" = =3D '06485' OR "rfq_no" =3D '06486' OR "rfq_no" =3D '06487' OR "rfq_no" =3D= '06488' OR "rfq_no" =3D '06489' OR "rfq_no" =3D '06490' OR "rfq_no" =3D '0= 6492' OR "rfq_no" =3D '06493' OR "rfq_no" =3D '06494'' [ fetched 10 rows ] ------=_NextPart_000_0022_01C26BA6.F904CDE0--