procedure TForm1.Button2Click(Sender: TObject);
begin
{Opens the table in exclusive mode}
try
with Table1 do
begin
Active := False;
Exclusive := True;
Active := True;
try
EmptyTable;
except
ShowMessage('Cannot empty database');
end;
end
except
ShowMessage('cannot open table in exclusive mode');
end
end;
|