7 个解决方案
#1
没有人遇到过这样的问题吗?
#2
这是midas最大的bug,borland一直没改
#3
如果可以的话,后台数据库字段不要用nvarcahr,改用varchar就ok
#4
到底如何能解决这个问题啊,或者有什么可以替代的方法
#5
直接用SQL语句或者LOCAT,,建议在服务器上作查询,,在客户端用FITER,用户回受不了的!!
#6
该过程代码如下:
procedure TSysLookupFM.BtnFilterClick(Sender: TObject);
begin
EdtFilter.SetFocus;
with FField.LookupDataSet do begin
Filtered := False;
Filter := '';
if Trim(EdtFilter.Text) <> '' then begin
Filter := '(';
Filter := Filter + Fields[1].FieldName + ' like ' + QuotedStr(Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text));
Filter := Filter + ')';
if FieldCount > 4 then begin
Filter := Filter + ' and ' + Fields[4].FieldName + ' = 0 ';
end;
end else begin
if FieldCount > 4 then begin
Filter := Fields[4].FieldName + ' = 0 ';
end;
end;
Filtered := True;
BtnYes.Enabled := not IsEmpty;
end;
end;
procedure TSysLookupFM.BtnFilterClick(Sender: TObject);
begin
EdtFilter.SetFocus;
with FField.LookupDataSet do begin
Filtered := False;
Filter := '';
if Trim(EdtFilter.Text) <> '' then begin
Filter := '(';
Filter := Filter + Fields[1].FieldName + ' like ' + QuotedStr(Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text));
Filter := Filter + ')';
if FieldCount > 4 then begin
Filter := Filter + ' and ' + Fields[4].FieldName + ' = 0 ';
end;
end else begin
if FieldCount > 4 then begin
Filter := Fields[4].FieldName + ' = 0 ';
end;
end;
Filtered := True;
BtnYes.Enabled := not IsEmpty;
end;
end;
#7
是你的Oracle的字符集的问题。
#1
没有人遇到过这样的问题吗?
#2
这是midas最大的bug,borland一直没改
#3
如果可以的话,后台数据库字段不要用nvarcahr,改用varchar就ok
#4
到底如何能解决这个问题啊,或者有什么可以替代的方法
#5
直接用SQL语句或者LOCAT,,建议在服务器上作查询,,在客户端用FITER,用户回受不了的!!
#6
该过程代码如下:
procedure TSysLookupFM.BtnFilterClick(Sender: TObject);
begin
EdtFilter.SetFocus;
with FField.LookupDataSet do begin
Filtered := False;
Filter := '';
if Trim(EdtFilter.Text) <> '' then begin
Filter := '(';
Filter := Filter + Fields[1].FieldName + ' like ' + QuotedStr(Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text));
Filter := Filter + ')';
if FieldCount > 4 then begin
Filter := Filter + ' and ' + Fields[4].FieldName + ' = 0 ';
end;
end else begin
if FieldCount > 4 then begin
Filter := Fields[4].FieldName + ' = 0 ';
end;
end;
Filtered := True;
BtnYes.Enabled := not IsEmpty;
end;
end;
procedure TSysLookupFM.BtnFilterClick(Sender: TObject);
begin
EdtFilter.SetFocus;
with FField.LookupDataSet do begin
Filtered := False;
Filter := '';
if Trim(EdtFilter.Text) <> '' then begin
Filter := '(';
Filter := Filter + Fields[1].FieldName + ' like ' + QuotedStr(Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text) + '%');
Filter := Filter + ' or ' + Fields[1].FieldName + ' like ' + QuotedStr('%' + Trim(EdtFilter.Text));
Filter := Filter + ')';
if FieldCount > 4 then begin
Filter := Filter + ' and ' + Fields[4].FieldName + ' = 0 ';
end;
end else begin
if FieldCount > 4 then begin
Filter := Fields[4].FieldName + ' = 0 ';
end;
end;
Filtered := True;
BtnYes.Enabled := not IsEmpty;
end;
end;
#7
是你的Oracle的字符集的问题。