[patch_done] TZUpdateSQL - Implicit AnsiString typecast with

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

[patch_done] TZUpdateSQL - Implicit AnsiString typecast with

Post by olehs »

TZUpdateSql.FillStatement calls SetString, which accepts AnsiString, for UnicodeString data.
Possible fix is in the attachment
You do not have the required permissions to view the files attached to this post.
Last edited by olehs on 10.11.2009, 10:44, edited 1 time in total.
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Related this patch I noted that

src\component\ZDbcCachedResultSet.pas
procedure TZAbstractRODataset.SetStatementParams

{$IFNDEF VER150BELOW} // not available on Delhi 7
ftWideString:
Statement.SetUnicodeString(I + 1, Param.AsWideString);
{$ENDIF}

while
src\component\ZDatasetUtils.pas
procedure FetchFromResultSet

ftWidestring:
RowAccessor.SetUnicodeString(FieldIndex, ResultSet.GetUnicodeString(ColumnIndex));

So my question is: shoudn't be protected if you use Delphi 7?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

SVN rev 719.

seawolf,

It did compile on D7. I think it's the Param.AsWideString that isn't available in D7.

Mark
Image
Locked