L
lancy
Unregistered / Unconfirmed
GUEST, unregistred user!
Project Salary.exe raised exception class EAccess Violation with message
'Access violation' at address 005194F0 in module 'salary.exe'.Read of address
0000030C'.
我都将所有的表都关掉了。但执行到 frmLogin.TblPasswd.Close; 时就停下了,就出现
上面的提示。下面是我的程序段:
procedure TfrmBack.Button1Click(Sender: TObject);
var
ach:string;
begin
with frmSalary do
begin
table1.Close;
Query1.Close;
end;
frmAllSDetail.Table1.Close;
frmcollect.Table1.Close;
frmLogin.TblPasswd.Close;
frmSalaryItem.Table1.Close;
frmSalaryItem.Query1.Close;
if Edit1.Text='' then exit;
if copy(Edit1.Text,strlen(pchar(Edit1.Text)),1)='/' then
ach:=''
else
ach:='/';
Table1.Close;
Table2.CLose;
Table1.TableName := 'Salary.db';
Table2.TableName := Edit1.Text + ach + 'Salary.db';
Table1.Open ;
Table2.Open ;
BatchMove1.Mode := batCopy;
BatchMove1.Execute;
end;
'Access violation' at address 005194F0 in module 'salary.exe'.Read of address
0000030C'.
我都将所有的表都关掉了。但执行到 frmLogin.TblPasswd.Close; 时就停下了,就出现
上面的提示。下面是我的程序段:
procedure TfrmBack.Button1Click(Sender: TObject);
var
ach:string;
begin
with frmSalary do
begin
table1.Close;
Query1.Close;
end;
frmAllSDetail.Table1.Close;
frmcollect.Table1.Close;
frmLogin.TblPasswd.Close;
frmSalaryItem.Table1.Close;
frmSalaryItem.Query1.Close;
if Edit1.Text='' then exit;
if copy(Edit1.Text,strlen(pchar(Edit1.Text)),1)='/' then
ach:=''
else
ach:='/';
Table1.Close;
Table2.CLose;
Table1.TableName := 'Salary.db';
Table2.TableName := Edit1.Text + ach + 'Salary.db';
Table1.Open ;
Table2.Open ;
BatchMove1.Mode := batCopy;
BatchMove1.Execute;
end;