高手来帮忙下
procedure TForm1.lv1Data(Sender: TObject; Item: TListItem);var
str:string;
s:Tstrings;
i:integer;
j:integer;
Item1:TListItem;
begin
with qry1 do
begin
Close;
SQL.Clear;
Close;
SQL.Text:='Select sysobjects.name,User_name(Uid) as owner,Xtype from Sysobjects where Xtype=''U'' or Xtype=''S'' ';
Open;
LV1.Items.Clear;
while NOT Eof do
begin
ITEM1:=lv1.items.add;
item1.Caption:=fieldByName('name').Value; //循环不执行
ITEM1.SubItems.add(fieldByName('owner').Value); //循环不执行
Qry1.Next;
end;
end
以上代码错在哪个地方,我注释处没执行,程序最后错误是无法定位之类的,才入手Delphi,望高手指教