Page 1 of 1

Row buffer width exceeded. Try using fewer or longer columns

Posted: 31.10.2010, 19:42
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.';

Posted: 07.11.2010, 23:44
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

Posted: 08.11.2010, 10:52
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.