[patch_done] Delphi 2010 + ZEOS 7.0.0 + MySQL + cxGrid

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

DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

EgonHugeist wrote:Ms Access and import in result mess
Reduce the length of the columns in the database and check the charset
After importing the Russian words do not appear in the dbForge ... But zeos their displays ... Encoding utf8 ... Do you import with errors or what?
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

После дополнительного анализа, оказалось что все поля с типом VARCHAR вызывают ошибки... Кодировка у них стоит utf8 сейчас попробую переконвертировать данные в cp1251... Результат сообщу....
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

DoctorZLO,

I can't understand you here. And i can't test the issue by my selves. I do not use the cx-components. Normaly that should work, but i don't know how this components behave or how they use the allocated memory..

I've downloaded your access files but i cast use them because my system default codepage is 1252 west eoropean..

So i hope other users can help you here.

Michael
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
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

Here lay out a script with the database is still out error when trying to create all the columns ... Encoding сp1251 ...

Image

Image

At Delphi XE too causing the error but it complains the file rtl150.bpl

MyDAC error does not cause ... :(
You do not have the required permissions to view the files attached to this post.
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

EgonHugeist wrote:DoctorZLO,

I can't understand you here. And i can't test the issue by my selves. I do not use the cx-components. Normaly that should work, but i don't know how this components behave or how they use the allocated memory..

I've downloaded your access files but i cast use them because my system default codepage is 1252 west eoropean..

So i hope other users can help you here.

Michael
Strange also then that the component MemTableEh gives exactly the same mistake ...
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

on Delphi 2007 everything works!
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

DoctorZLO,

If it works with D2007 then we have again a Row size problem. An issue of the 2Byte Unicode chars of Delphi12_up.

You can solve this for your selves.

Open ZDbcCache.pas
Search for a TZRowBuffer = array[0..64KB] of Byte. Actually we have a row buffer size of static 64KB. Grow him up to 128*1024 Bytes and Tell me if that helps...

Michael
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
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

Ok! I take a look and tell you!
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

Record TZRowBuffer = array [0 .. 64KB] of everyday life is not ... Here is what I found:

{** Defines a header for row buffer. }
TZRowBuffer = packed record
Index: Integer;
UpdateType: TZRowUpdateType;
BookmarkFlag: Byte;
Columns: TZByteArray;
end;
PZRowBuffer = ^TZRowBuffer;

************************************************

const
RowHeaderSize = SizeOf(TZRowBuffer) - SizeOf(TZByteArray); // M.A. RowHeaderSize = SizeOf(TZRowBuffer) - SizeOf(TByteArray);


Nothing changed, I did not just tell you the result ...
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

Oh i'm sorry. Check the TZByteArray and grow the memory up.

The TZRowBuffer was wrong here..

Michael
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
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

EgonHugeist wrote:Oh i'm sorry. Check the TZByteArray and grow the memory up.

The TZRowBuffer was wrong here..

Michael
Did you say ... Increased memory ...

Image

Now this error:

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

Post by EgonHugeist »

Yes i did, but it seem's not to be the problem..

Now i don't know how i can help you. Maybe you can help us to solve this issue? Can you try to debug on runtime?

Michael
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
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

I can try, but I can not promise anything ... I do not know the structure of the components ... If you say you have to start from, and where some may be a bug then I will try ...
And one more problem ... An error occurs during the design ... At a time when I try to create fields in the component cxGrid ... Screenshot I made...
DoctorZLO
Senior Boarder
Senior Boarder
Posts: 62
Joined: 12.03.2012, 17:26

Post by DoctorZLO »

asked a question on the forum Dev Express here: http://www.devexpress.com/Support/Cente ... 44e3ff688c

Let's see what they answer ...

maintenance errors that will come out Delphi
You do not have the required permissions to view the files attached to this post.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

DoctorZLO,

that's a good choise but i don't know if they will help us.
I've uploaded one patch for a missing null-byte reservation but that patch will not solve your problem, i think. Rev. 1346

Do you have the same trouble if you use the normal DBGrid?

Hmm where to start is a good question. I'm still thinking it is a memory problem. So open ZdbcCache again and goto:

Code: Select all

  Creates this object and assignes the main properties.
  @param ColumnsInfo a collection with column information.
}
constructor TZRowAccessor.Create(ColumnsInfo: TObjectList);
var
  I: Integer;
  Current: TZColumnInfo;
begin
  FBuffer := nil;
  FColumnCount := ColumnsInfo.Count;
  FColumnsSize := 0;
  SetLength(FColumnNames, FColumnCount);
  SetLength(FColumnCases, FColumnCount);
  SetLength(FColumnTypes, FColumnCount);
  SetLength(FColumnLengths, FColumnCount);
  SetLength(FColumnOffsets, FColumnCount);
  SetLength(FColumnDefaultExpressions, FColumnCount);
  FHasBlobs := False;

  for I := 0 to FColumnCount - 1 do
  begin
    Current := TZColumnInfo(ColumnsInfo[I]);
    FColumnNames[I] := Current.ColumnName;
    FColumnCases[I] := Current.CaseSensitive;
    FColumnTypes[I] := Current.ColumnType;
    FColumnLengths[I] := GetColumnSize(Current);
    FColumnOffsets[I] := FColumnsSize;
    FColumnDefaultExpressions[I] := Current.DefaultExpression;
    Inc(FColumnsSize, FColumnLengths[I] + 1);
    if FColumnsSize > SizeOf(TZByteArray)-1 then
      raise EZSQLException.Create(SRowBufferWidthExceeded);
    FHasBlobs := FHasBlobs
      or (FColumnTypes[I] in [stAsciiStream, stUnicodeStream, stBinaryStream]);
  end;
  FRowSize := FColumnsSize + RowHeaderSize;
end;
set a breakpoint on the line Inc(FColumnsSize, FColumnLengths + 1);

and check the FColumnsSize. An overload should normaly raise an exception.

Another possibility. Try to limit the selected rows like: select * from .. where .. limit 10). And check the issue.

On the other hand i've no real idea where to start. Just jump through the lines at runtime. Try to findout where the exception is raised.

Michael
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
Locked