Row buffer width exceeded. Try using fewer or longer columns

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
Marius2
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 06.12.2008, 13:07

Row buffer width exceeded. Try using fewer or longer columns

Post by Marius2 »

After finally switching my database to UTF8/Dialect3 i'm getting the SRowBufferWidthExceeded error (obviously since each varchar(200) is now occupying in reality 800 bytes)

This condition seems to have todo with with the TByteArray = array [0..32767] of byte. Why is Zeos using such a limited buffer? Can it be replaced with TBytes or another less limiting type?

Greetings,
Marius


unit ZDbcCache;

....

constructor TZRowAccessor.Create(ColumnsInfo: TObjectList);
......
FColumnDefaultExpressions := Current.DefaultExpression;
Inc(FColumnsSize, FColumnLengths + 1);
// 32768 is the length of a TByteArray. (HeidiSQL patch)
if FColumnsSize > 32767 then
begin
raise EZSQLException.Create(SRowBufferWidthExceeded);
end;



Where SRowBufferWidthExceeded ='Row buffer width exceeded. Try using fewer or longer columns in SQL query.';
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Marius,

I don't know if TBytes is supported by the 'older' or 'alternative' compilers. Maybe TByteDynArray is a better choice.
We did try to increase the limit before, but that caused other trouble.
Please try if you can do so with the zeoslib 7 SVN testing branch version. If your try doesn't break the test suite for D7-DXE and Lazarus, your change will be accepted.

Mark
Image
Marius2
Fresh Boarder
Fresh Boarder
Posts: 18
Joined: 06.12.2008, 13:07

Post by Marius2 »

TBytes is not supported for older versions but is very easy to introduce. Just a ifdef and typedef TBytes = array of Byte will do the job. I have currently no idea about the impact of this.

Unfortunately i'm afraid i cannot make the time at this moment so for now we have fallback on Anydac.
Locked