5,388
社区成员
发帖
与我相关
我的任务
分享
function TForm1.ZHInverseEN(zhStr: String): String;
var
tempStr:String;
count :integer;
begin
with DM do
begin
ADOQuery2.Close;
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add('select FIELD_DBNAME from TB0002_FIELD_INDEX where FIELD_TITLE=:aa');
ADOQuery2.Parameters.Items[0].Value:=zhStr;
ADOQuery2.Open;
ADOQUery2.First;
while not ADOQuery2.Eof do
begin
tempStr:= ADOQuery2.Fields.Fields[0].Value;
result:= tempStr;
ADOQuery2.Next;
end;
end;
end;
。。。。。。。。。。
。。。。。。。。。。。。
for count:=0 to listbox.Count-1 do
begin
tempStrList.Append(self.ZHInverseEN(listbox.Items.Strings[count]));--问题处
end;
。。。。。。。。。。。。。
function TForm1.getQueryStrList(listbox: TListBox):TStringList;
var
tempStrList:TStringList;
count:integer;
begin
tempStrList := TStringList.Create();--我也有create();好象没有你说的create(nil)方法
for count:=0 to listbox.Count-1 do
begin
tempStrList.Append(self.ZHInverseEN(listbox.Items.Strings[count]));
end;
result:=tempStrList;
end;
ADOQUery2.First;
while not ADOQuery2.Eof do
begin
tempStr:= ADOQuery2.Fields.Fields[0].Value;
result:= tempStr;
ADOQuery2.Next;
end;
for count:=0 to listbox.Count-1 do
begin
tempStrList.Append(self.ZHInverseEN(listbox.Items.Strings[count]));
end;
result:=tempStrList;