Delphi 2005 + zeos + Postgresql - reconnect problem

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
stepel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 11.05.2010, 12:57

Delphi 2005 + zeos + Postgresql - reconnect problem

Post 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?
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post 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!
stepel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 11.05.2010, 12:57

Post by stepel »

yes i did like u write. When query didn't execute then i try to reconnect. I'll check zeos 7
stepel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 11.05.2010, 12:57

Post 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};
stepel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 11.05.2010, 12:57

Post by stepel »

I installed.. and the problem still exists...
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post 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!
Post Reply