procedure TAdoMacroQry.ExpandMacros;
var i :integer;
tsSQL,tsValue :string;
begin
tsSQL :=FMacroSQL.GetText();
for i :=FMacroParams.Count -1 downto 0 do
begin
case FMacroParams[i].DataType of
ftDate: tsValue :=''''+ FormatDatetime('yyyy-mm-dd', FMacroParams[i].Value) +'''';
else tsValue :=FMacroParams[i].Value;
end;
tsSQL :=StringReplace(tsSQL, ':'+FMacroParams[i].Name
, tsValue, [rfReplaceAll, rfIgnoreCase]);
end;
inherited SQL.SetText(PChar(tsSQL));end;错误提示:incompatible types:'char' and 'widechar'怎么解决
var i :integer;
tsSQL,tsValue :string;
begin
tsSQL :=FMacroSQL.GetText();
for i :=FMacroParams.Count -1 downto 0 do
begin
case FMacroParams[i].DataType of
ftDate: tsValue :=''''+ FormatDatetime('yyyy-mm-dd', FMacroParams[i].Value) +'''';
else tsValue :=FMacroParams[i].Value;
end;
tsSQL :=StringReplace(tsSQL, ':'+FMacroParams[i].Name
, tsValue, [rfReplaceAll, rfIgnoreCase]);
end;
inherited SQL.SetText(PChar(tsSQL));end;错误提示:incompatible types:'char' and 'widechar'怎么解决
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货