Fórum verificando se o arquivo está em uso #331908
23/10/2006
0
procedure TF_VendaPrazo.FormShow(Sender: TObject);
begin
deu_erro:=false;
try
tb_ficha.tablename:=marq;
tb_ficha.TableType := ttfoxpro;
tb_ficha.Exclusive:=true;
tb_ficha.Open;
tb_ficha.Active:=true;
except
on EDataBaseError do
Begin
deu_erro:=true;
MessageDlg(´Ficha de cliente já está em uso em outro terminal!´,mtError, [mbOk],0);
tb_ficha.active:=false;
tb_ficha.close;
exit;
End;
end;
if deu_erro=true then
begin
f_vendaprazo.close;
f_clientes.edt_nome.setfocus;
end;
Ghsol
Curtir tópico
+ 0Posts
24/10/2006
Siam
Gostei + 0
24/10/2006
Ghsol
if deu_erro=true then
begin
f_vendaprazo.close;
f_clientes.edt_nome.setfocus;
exit;
end;
Gostei + 0
24/10/2006
Ghsol
Gostei + 0
24/10/2006
Siam
Gostei + 0
25/10/2006
Amarildo
MODULO.TCHEQUES.IndexFieldNames := ´CHQ_NUMERO´;
if MODULO.TCHEQUES.Findkey( [Codigo] ) then
begin
if MessageDlg(´Registro já existente, deseja alterá-lo?´, mtConfirmation, [MbYes, mbNo], 0) = mrYes then
begin
try
MODULO.TCHEQUES.Edit;
except
on E: Exception do
begin
MessageBeep(0);
Str := E.Message;
if (Pos(´User:´, Str) > 0)
then
Str := Copy(Str,Pos(´User:´, Str)+5, Length(Str))
else
Str := ´Usuário desconhecido´;
FORMMENSAGEM.LabelUSUARIO.Caption := Str;
FORMMENSAGEM.SHOWMODAL;
DBEDITCONTACORRENTE.SETFOCUS;
end;
end;
end
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)