Page 2 of 4

Posted: 28.05.2012, 16:23
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?

Posted: 31.05.2012, 06:03
by DoctorZLO
После дополнительного анализа, оказалось что все поля с типом VARCHAR вызывают ошибки... Кодировка у них стоит utf8 сейчас попробую переконвертировать данные в cp1251... Результат сообщу....

Posted: 31.05.2012, 11:29
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

Posted: 31.05.2012, 12:31
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 ... :(

Posted: 31.05.2012, 12:39
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 ...

Posted: 01.06.2012, 08:29
by DoctorZLO
on Delphi 2007 everything works!

Posted: 01.06.2012, 09:35
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

Posted: 01.06.2012, 12:47
by DoctorZLO
Ok! I take a look and tell you!

Posted: 01.06.2012, 13:05
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 ...

Posted: 01.06.2012, 14:22
by EgonHugeist
Oh i'm sorry. Check the TZByteArray and grow the memory up.

The TZRowBuffer was wrong here..

Michael

Posted: 01.06.2012, 23:07
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

Posted: 02.06.2012, 06:35
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

Posted: 02.06.2012, 12:03
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...

Posted: 02.06.2012, 12:37
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

Posted: 02.06.2012, 13:25
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