Full Unicode/Ansi-Support in /testing branch
Moderators: gto, EgonHugeist, olehs
@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
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.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
@miab3,
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
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);
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
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.
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
olehs,
this type is hadled as stString. Is this type also clientencoding dependent?
Michael
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
olehs,
according the "bpchar": Patch done Rev.1611
Also do i wonder about "Bit" and "varbit". Are they right interpreted?
Michael
sounds great for me. It is also very helpfull if you add some test to validate the result..I'll do it tonight.
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/
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/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
olehs,
ok this is great. For me personally should be a bit 0 or 1=stByte. But if this is ok for postgre..
Michael
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/
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/
@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
@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
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
@miab3,
Michal, what does that mean? I can compile everything without problems. What happens?
Michael
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/
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/
@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
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
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
miab3,
???? What's that? Can you change the ordor of the packages? Compile ZPlain before ZParseSQL. Does this help?
Michael
???? 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/
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/
@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
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