Page 1 of 1

Delphi 2005 + zeos + Postgresql - reconnect problem

Posted: 04.08.2010, 16:11
by stepel
Hi,

I have problem with reconnect to postgresql server after stop service and start service. I get Access violation in ntdll.dll Exception.

I use DB.Reconnect;


Any ideas?

Posted: 05.08.2010, 07:25
by Wild_Pointer
Hello stepel,

please tell me if I understand the problem correctly. You have a program witch connects to Postgresql server. After connection is made you restart Postgresql server and then try to reconnect. That's when you get the AV Exception. One question: do you try (and fail) to execute some query with broken connection before trying to reconnect? If so - this is a known issue. It happens because of the ill storing of connection handle in statement object. It was fixed, but only in zeos 7 I guess, because the patch was committed after the release of Zeos 6.6.6. Please try using Zeos 7 as it is fairly stable (in my experience).

Good luck!

Posted: 05.08.2010, 08:31
by stepel
yes i did like u write. When query didn't execute then i try to reconnect. I'll check zeos 7

Posted: 05.08.2010, 17:52
by stepel
hmm if i want to install zeos 7 i have to remove zeos component 6.6.6 ? Because i have problem with install (compile all projects). I get error sth about ftWideMemo: here

stUnicodeStream:
Result := {$IFDEF VER150BELOW}ftWideString{$ELSE}ftWideMemo{$ENDIF};

Posted: 05.08.2010, 18:47
by stepel
I installed.. and the problem still exists...

Posted: 06.08.2010, 06:04
by Wild_Pointer
Hello stepel,

I use Delphi 2006 and latest build zeos 7 from svn. I checked and it works ok in folowing case: connection made, query executed, connection broken (I use CurrPorts for that), query executed and exception raised, connection reconnected, query executed (successfully).

My guess is you didn't install zeos 7 properly... Did you removed old bpl files before installing zeos 7? Did you notice change in component artwork after installing?

Good luck!