Page 1 of 1

[patch_done] TZUpdateSQL - Implicit AnsiString typecast with

Posted: 09.11.2009, 21:18
by olehs
TZUpdateSql.FillStatement calls SetString, which accepts AnsiString, for UnicodeString data.
Possible fix is in the attachment

Posted: 09.11.2009, 22:04
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?

Posted: 12.11.2009, 00:26
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