M
mrzpz
Unregistered / Unconfirmed
GUEST, unregistred user!
功能:当DBEdit1的内容发生变化时,程序自动去搜索wwtable1中的数据库。
但运行时总出现‘project *** raised exception class EAccessViolation with message "Access Violation at adress...."’
请指点。
程序如下:
procedure TForm1.DBEdit1Change(Sender: TObject);
var
seekship:string;
begin
with wwTable1 do
Begin
IndexFieldName:='ShipName';
if not (DBEdit1.Text = null) then
begin
seekship:=UpperCase(DBEdit1.text);
Findnearest([SeekShip]);
end;
end;
end;
但运行时总出现‘project *** raised exception class EAccessViolation with message "Access Violation at adress...."’
请指点。
程序如下:
procedure TForm1.DBEdit1Change(Sender: TObject);
var
seekship:string;
begin
with wwTable1 do
Begin
IndexFieldName:='ShipName';
if not (DBEdit1.Text = null) then
begin
seekship:=UpperCase(DBEdit1.text);
Findnearest([SeekShip]);
end;
end;
end;