TZQuery MAX Fields

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

Moderators: gto, EgonHugeist

Post Reply
pabloarthur
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 20.10.2009, 16:39

TZQuery MAX Fields

Post by pabloarthur »

Hello:

My question is simple. I am using Delphi 6, latest Service Packs.
MySQL Version 5.0.
and Zeos 6.6.5

I have no problem running TZQuery for queries with less than 256 fields. But when I get to a TZQuery that is more than 256 fields I get an ERangeError with Message 'Range Check Error' I have traced the problem to this line of code in the ZPlainMySQLDriver.pas:

Result := ZPlainMySql41.PMYSQL_ROW(ROW)[Offset]; into this context of code:

function TZMySQL41PlainDriver.GetFieldData(Row: PZMySQLRow;
Offset: Cardinal): PChar;
begin
Result := ZPlainMySql41.PMYSQL_ROW(ROW)[Offset];
end;

I am probably missing a constant to set up the MAX number of fields returned by the TZQuery. Does anyone knows where i can set this constant or anyone have an idea what could be happening?

Thanks in Advance,

Pablo
WorldWalker
Junior Boarder
Junior Boarder
Posts: 25
Joined: 10.10.2009, 18:57

Post by WorldWalker »

Hello,
It could be linked to a DBGrid too, did you check that?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Well, I think 256 fields really may be the practical limit. We have tried to expand that number once, but then all apps using zeoslib start eating huge amounts of memory.
If I remember correctly the change to allow more fields was small. If I could only remember where the topic was discussed.
There's http://zeos.firmos.at/viewtopic.php?t=1367 but there also was a follow-up thread where this solution was reverted.

Mark
Image
Post Reply