Postgresql + Delphi 7 + ZeosLib + Long Strings

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
mnemonic_br
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 13.09.2013, 10:45

Postgresql + Delphi 7 + ZeosLib + Long Strings

Post by mnemonic_br »

Hello! I've reading since last week this forum before I could post, but I cannot find any solution, sorry me if I failed in searching better.

Well, I am using a Delphi 7 application that reads a long string field. I read that newest version had no more issues, so I changed my old 6.6 to the new 7.1.3-stable, but after run I had the same problem. After that 4069 bytes get truncated or with pointer errors (showing non corrects characteres).

I tried cast the text field with varchar(8128, ie.), tried use .AsVariant, .Text... or I get error or it doenst works. I also read something about change the limit but I cannot found how to.

Please someone else is facing that, and if so, how to fix it?

Thank you very much!
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: Postgresql + Delphi 7 + ZeosLib + Long Strings

Post by miab3 »

@mnemonic_br,
so I changed my old 6.6 to the new 7.1.3-stable
Do not use version 7.1.3-stable (mistakenly published), only use version 7.1.3a-stable.

Michał
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Postgresql + Delphi 7 + ZeosLib + Long Strings

Post by EgonHugeist »

@mnemonic_br,

Michal is right here with the Zeos version.

To your issue: You won't be lucky with strings > 8KB -1Byte Since TString/WideString field of unit DB supports 8KB-#0 byte only. So you're producing unwanted stack-killers.
Delphi writes TField.Size equals to count of Chars which is horrable wrong for MBCS encoded strings...

May i ask for you field declaration?

Possible suggestion: Use 7.2 and add a global define {WITH_ZSTRINGFIELDS} to your project options. I've alredy started to kill such showstoppers of Delphi and FPC but i'm not ready...It's untested and TField.Validate doesn't work. Otherwise these fields will increase your performance too.. Just an suggestion.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply