Can someone provide a step by step manual how to install zeoslib on Delphi XE? because i have seem some post with patch and things, but none of them work to me..
I get some errors all the time.
This is one of them.
[DCC Error] ZSysUtils.pas(454): E2010 Incompatible types: 'PAnsiChar' and 'PWideChar'
How to install Zeoslib on Delphi XE?
Moderators: gto, EgonHugeist, olehs
-
- Fresh Boarder
- Posts: 1
- Joined: 09.06.2011, 03:34
Well it happens with me too, while i try to build zeosdbo-7.0.0-alpha with my delphi xe it says [DCC Error] ZSysUtils.pas(454): E2010 Incompatible types: 'PAnsiChar' and 'PWideChar' in ZSysUtils.pas in this code
function StartsWith(const Str, SubStr: string): Boolean;
var
LenSubStr: Integer;
begin
LenSubStr := Length(SubStr);
if SubStr = '' then
Result := True
else if LenSubStr <= Length(Str) then
//Result := Copy(Str, 1, Length(SubStr)) = SubStr;
{$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Str), PChar(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Str), PChar(SubStr), LenSubStr)
{$ENDIF}
else
Result := False;
end;
and this code
function EndsWith(const Str, SubStr: string): Boolean;
var
LenSubStr: Integer;
LenStr: Integer;
begin
if SubStr = '' then
Result := False // act like Delphi's AnsiEndsStr()
else
begin
LenSubStr := Length(SubStr);
LenStr := Length(Str);
if LenSubStr <= LenStr then
//Result := Copy(Str, LenStr - LenSubStr + 1, LenSubStr) = SubStr
{$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Pointer(Str)) + LenStr - LenSubStr,
Pointer(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Pointer(Str)) + LenStr - LenSubStr,
Pointer(SubStr), LenSubStr)
{$ENDIF}
else
Result := False;
end;
end;
the ZPlainMySqlConstants.pas has [DCC Error] ZPlainMySqlConstants.pas(229): E2003 Undeclared identifier: 'UInt' error
in line MYSQL_FIELD_OFFSET = UInt;
the ZGenericSqlToken.pas has [DCC Error] ZGenericSqlToken.pas(206): E2003 Undeclared identifier: 'ttTime' error
in line
// Time constant
if (CountDoublePoint = 2) and (CountSlash = 0) then
begin
try
Result.Value := DecodeString(Result.Value,'"');
Result.TokenType := ttTime;
except
end;
i think it seems the component has not done yet, well may be any one who develop the zeosdbo will fix it as soon as possible, since this component is very use full, and help a lot of programmers
sorry if my english is bad
function StartsWith(const Str, SubStr: string): Boolean;
var
LenSubStr: Integer;
begin
LenSubStr := Length(SubStr);
if SubStr = '' then
Result := True
else if LenSubStr <= Length(Str) then
//Result := Copy(Str, 1, Length(SubStr)) = SubStr;
{$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Str), PChar(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Str), PChar(SubStr), LenSubStr)
{$ENDIF}
else
Result := False;
end;
and this code
function EndsWith(const Str, SubStr: string): Boolean;
var
LenSubStr: Integer;
LenStr: Integer;
begin
if SubStr = '' then
Result := False // act like Delphi's AnsiEndsStr()
else
begin
LenSubStr := Length(SubStr);
LenStr := Length(Str);
if LenSubStr <= LenStr then
//Result := Copy(Str, LenStr - LenSubStr + 1, LenSubStr) = SubStr
{$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Pointer(Str)) + LenStr - LenSubStr,
Pointer(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Pointer(Str)) + LenStr - LenSubStr,
Pointer(SubStr), LenSubStr)
{$ENDIF}
else
Result := False;
end;
end;
the ZPlainMySqlConstants.pas has [DCC Error] ZPlainMySqlConstants.pas(229): E2003 Undeclared identifier: 'UInt' error
in line MYSQL_FIELD_OFFSET = UInt;
the ZGenericSqlToken.pas has [DCC Error] ZGenericSqlToken.pas(206): E2003 Undeclared identifier: 'ttTime' error
in line
// Time constant
if (CountDoublePoint = 2) and (CountSlash = 0) then
begin
try
Result.Value := DecodeString(Result.Value,'"');
Result.TokenType := ttTime;
except
end;
i think it seems the component has not done yet, well may be any one who develop the zeosdbo will fix it as soon as possible, since this component is very use full, and help a lot of programmers
sorry if my english is bad
It seems that the define DELPHI12_UP is not correctly set. This should happen normally with the Zeos.inc file. If i can remember correctly i got something similiar and manually putting a {$DEFINE VER220} in the Zeos.inc file helped.sastropawiro wrote: {$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Str), PChar(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Str), PChar(SubStr), LenSubStr)
{$ENDIF}
-
- Fresh Boarder
- Posts: 5
- Joined: 10.06.2011, 04:42
- Location: Dumaguete City, Philippines
Try this
http://www.silverpointdevelopment.com/m ... /index.htm
[Package - ZeosDBO 7.0.0 Alpha]
Name=ZEOSDBO-7.0.0
Zip=ZEOSDBO-7.0.0-alpha.zip
Folder=zeos
SearchPath="src\component","src\core","src\dbc", "src\parsesql", "src\plain"
Includes="$BaseFolder\src\component","$BaseFolder\src\core","$BaseFolder\src\dbc","$BaseFolder\src\parsesql","$BaseFolder\src\plain"
;GroupIndex=1
D14="packages\delphi14\ZCore.dpk", "packages\delphi14\ZPlain.dpk", "packages\delphi14\ZParseSql.dpk", "packages\delphi14\ZDbc.dpk","packages\delphi14\ZComponent.dpk", "packages\delphi14\ZComponentDesign.dpk"
code worked for me! EXCELLENT!
http://www.silverpointdevelopment.com/m ... /index.htm
[Package - ZeosDBO 7.0.0 Alpha]
Name=ZEOSDBO-7.0.0
Zip=ZEOSDBO-7.0.0-alpha.zip
Folder=zeos
SearchPath="src\component","src\core","src\dbc", "src\parsesql", "src\plain"
Includes="$BaseFolder\src\component","$BaseFolder\src\core","$BaseFolder\src\dbc","$BaseFolder\src\parsesql","$BaseFolder\src\plain"
;GroupIndex=1
D14="packages\delphi14\ZCore.dpk", "packages\delphi14\ZPlain.dpk", "packages\delphi14\ZParseSql.dpk", "packages\delphi14\ZDbc.dpk","packages\delphi14\ZComponent.dpk", "packages\delphi14\ZComponentDesign.dpk"
code worked for me! EXCELLENT!