Full Unicode/Ansi-Support in /testing branch

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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1309
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Zeos7testing_1598 compiles and runs on D2006, DXE2 32/64, LazarusWin1.1.0/fpc 2.7.1 32/64. (With a small exception on Oracle AQ$_QUEUES).

Could you ask for, how to use the new functionality of master-detail in a few words?

@ludob

I use {$Z+}, but this error occurs for DXE2-32(For DXE2-64 error does not occur). Michael mentioned that in his some versions of Delphi, too.

Michal
Last edited by miab3 on 26.07.2012, 18:40, edited 1 time in total.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

@miab3,

Code: Select all

  MasterQuery.SQL.Text := 'SELECT * FROM department ORDER BY dep_id';
  MasterQuery.Open;

  DetailQuery.SQL.Text := 'SELECT * FROM people';
  DetailQuery.MasterSource := MasterDataSource;
  DetailQuery.MasterFields := 'dep_id';
  DetailQuery.LinkedFields := 'p_dep_id';
  DetailQuery.Open;

  MasterQuery.First;
  CheckEquals(1, MasterQuery.FieldByName('dep_id').AsInteger);
  CheckEquals(2, DetailQuery.RecordCount);
  CheckEquals(1, DetailQuery.FieldByName('p_dep_id').AsInteger);

  MasterQuery.Next;
  CheckEquals(2, MasterQuery.FieldByName('dep_id').AsInteger);
  CheckEquals(2, DetailQuery.RecordCount);
  CheckEquals(2, DetailQuery.FieldByName('p_dep_id').AsInteger);
this is a master-datail relation. You can find examples also in unit \test\ZTestMasterDetail.pas

I think this example is better than my broken english. :)

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
olehs
Zeos Dev Team
Zeos Dev Team
Posts: 118
Joined: 09.11.2009, 21:05

Post by olehs »

EgonHugeist,

In PostgreSQLToSQLType(oid and typename version) bpchar(oid=1042) should be treated as char
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

olehs,

1042: Result := stString; { bpchar }
Is defined as stringvalue. Is this type also dependend to the clientencoding? If yes i've to use:

if Connection.GetClientCodePageInformations^.Encoding = ceUTF8 then
if Connection.UTF8StringAsWideField then
Result := stUnicodeString
else
Result := stString
else
Result := stString;


i applyed your patch of with the GetServerSetting/SetServerSetting. I like that idea, good work.

Michael

Btw. did you setup our testsuites? If yes and you know how to run the tests: Don't forget to ask for commit privileges.
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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

olehs,

this type is hadled as stString. Is this type also clientencoding dependent?

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
olehs
Zeos Dev Team
Zeos Dev Team
Posts: 118
Joined: 09.11.2009, 21:05

Post by olehs »

EgonHugeist,

Yes, it's clientencoding dependent.
did you setup our testsuites?
I'll do it tonight.
Oleg
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

olehs,
I'll do it tonight.
sounds great for me. It is also very helpfull if you add some test to validate the result..

according the "bpchar": Patch done Rev.1611

Also do i wonder about "Bit" and "varbit". Are they right interpreted?

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
olehs
Zeos Dev Team
Zeos Dev Team
Posts: 118
Joined: 09.11.2009, 21:05

Post by olehs »

Also do i wonder about "Bit" and "varbit". Are they right interpreted?
Yes, they are just strings of 1's and 0's
Oleg
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

olehs,

ok this is great. For me personally should be a bit 0 or 1=stByte. But if this is ok for postgre..

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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1309
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist
@ludob

Zeos7testing_1621 compiles and runs on D2006, DXE2 32/64, LazarusWin1.1.0/fpc 2.7.1 32/64. (With a small exception on Oracle AQ$_QUEUES in DXE2-32).

Since the error with Oracle AQ$_QUEUES is quite by accident that I think the reason that it is a garbage of memory. I've met in Delphi errors resulting from not cleaned the data memory areas before using.

Michal
miab3
Zeos Test Team
Zeos Test Team
Posts: 1309
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Too many declarations:
SetEscapeMarkSequence procedure (const Value: String);
in ZTokenizer.pas (r1623)
(Line 459 and 485)
Something is wrong with svn.

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

Post by EgonHugeist »

@miab3,

Too many declarations:
SetEscapeMarkSequence procedure (const Value: String);
in ZTokenizer.pas (r1623)
(Line 459 and 485)
Something is wrong with svn.

Michal, what does that mean? I can compile everything without problems. What happens?

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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1309
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

Delphi 2006 does not want to compile two declarations:

IZTokenizer = interface (IZInterface)
['{C7CF190B-C45B-4AB4-A406-5999643DF6A0}']
...
function GetCharacterState(StartChar: Char): TZTokenizerState;
procedure SetEscapeMarkSequence(const Value: String); <-------------------------
function AnsiGetEscapeString(const Ansi: ZAnsiString;
const EscapeMarkSequence: String = '~<|'): String;
function GetEscapeString(const Str: String;
const EscapeMarkSequence: String = '~<|'): String;
function TokenizeEscapeBufferToList(const SQL: String;
const EscapeMarkSequence: String = '~<|'): TZTokenDynArray;
end;

{** Implements a default tokenizer object. }
TZTokenizer = class (TZAbstractObject, IZTokenizer)
private
{$IFDEF DELPHI12_UP}
FCharacterStates: array[0..ord(high(char))] of TZTokenizerState;
{$ELSE}
FCharacterStates: array[0..255] of TZTokenizerState;
{$ENDIF}
FCommentState: TZCommentState;
FNumberState: TZNumberState;
FQuoteState: TZQuoteState;
FSymbolState: TZSymbolState;
FWhitespaceState: TZWhitespaceState;
FWordState: TZWordState;
FEscapeState: TZEscapeState; //EgonHugeist
FMarkSequence: String;
function GetEscapeMarkSequence: String;
procedure SetEscapeMarkSequence(const Value: String); <-------------------------
protected

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

Post by EgonHugeist »

miab3,

???? What's that? Can you change the ordor of the packages? Compile ZPlain before ZParseSQL. Does this help?

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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1309
Joined: 11.05.2012, 12:32
Location: Poland

Post by miab3 »

@EgonHugeist

So for me it is and Causes Error:

[Pascal Error] ZPostgreSqlToken.pas(114): E2003 Undeclared identifier: 'SetEscapeMarkSequence'
[Pascal Fatal Error] ZInterbaseToken.pas(61): F2063 Could not compile used unit '..\..\src\parsesql\ZPostgreSqlToken.pas'

(From Delphi2007 Delphi use MSBuild as the build engine)

Michal
Locked