Z
zhouzhilu
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm5.TreeView1GetSelectedIndex(Sender: TObject;
Node: TTreeNode);
begin
with datamodule2.IBQuery2 do
begin
close;
Sql.clear;
Sql.Add('select location,installdate from phone where phoneno='''+treeview1.selected.text+'''');
open;
edit1.text:=fieldbyname('location').asstring;
edit2.text:=fieldbyname('installdate').asstring;
end;
end;
上面是我编的一段是希望点种treeview 时,在文本框中显示相映的东西
这是在form5里我第一次从主form进入是可以的
但当我从form5 退出过一会再次进入时
出现了下面的错误:
project project1.exe raised execption class EAccess Violation with message
'Access violation at address 0049EDOA in module
'PRojuct1.exe
'.read of address 00000008'
Node: TTreeNode);
begin
with datamodule2.IBQuery2 do
begin
close;
Sql.clear;
Sql.Add('select location,installdate from phone where phoneno='''+treeview1.selected.text+'''');
open;
edit1.text:=fieldbyname('location').asstring;
edit2.text:=fieldbyname('installdate').asstring;
end;
end;
上面是我编的一段是希望点种treeview 时,在文本框中显示相映的东西
这是在form5里我第一次从主form进入是可以的
但当我从form5 退出过一会再次进入时
出现了下面的错误:
project project1.exe raised execption class EAccess Violation with message
'Access violation at address 0049EDOA in module
'PRojuct1.exe
'.read of address 00000008'