修改 业务模型\系统空间\用户界面基础\界面\系统接口\简单SQL条件构造窗体的这个函数
function TSimpleSQLFilterEditor.TextToValue(ADataType: TDataType;
AIsIN: Boolean; const AText: string): string;
var
lText: string;
begin
if AIsIN then
begin
Result := TextToInValue(ADataType, Trim(AText));
Exit;
end;
lText := GetFieldValue(AText);
Result := '';
case ADataType of
TDataType.dtString:
if FRelationOpr.text = 'LIKE' then //修改此处
Result := QuotedStr('%' + lText + '%')
else
Result := QuotedStr(lText);
TDataType.dtDateTime:
if Builder <> nil then
Result := StrToSQLDateTime(Builder.DBDriverName, lText)
else
Result := QuotedStr(lText);
TDataType.dtInteger,
TDataType.dtFloat,
TDataType.dtNumber,
TDataType.dtBlob,
TDataType.dtText,
TDataType.dtUnknown:
Result := lText;
else
Assert(False, '不支持的数据类型');
end;
end; |