Fórum erro de chave estrangeira, como mudar a mensagem? #335810
08/01/2007
0
obrigado a todos.
Ciotti
Curtir tópico
+ 0Posts
08/01/2007
Ciotti
Gostei + 0
08/01/2007
Eurismar
procedure TForm1.ClientDataSet1ReconcileError(
DataSet: TCustomClientDataSet; E: EReconcileError;
UpdateKind: TUpdateKind; var Action: TReconcileAction);
begin
if Pos(´violation of FOREIGN KEY´,E.Message) > 0 then
begin
ShowMessage(´sua mensagem´);
Action := raAbort;
end;
end;
Gostei + 0
08/01/2007
Ciotti
Gostei + 0
08/01/2007
Eurismar
Gostei + 0
08/01/2007
Dbergkamps10
Dialogs
Att
Dalton
Gostei + 0
08/01/2007
Ciotti
sera que nao existe outra meneira , estou usando o clientdataset .
banco fb com ibexpert.
valew
Gostei + 0
09/01/2007
Ciotti
sera que nao existe outra meneira , estou usando o clientdataset .
banco fb com ibexpert.
valew
Gostei + 0
09/01/2007
Ciotti
sera que nao existe outra meneira , estou usando o clientdataset .
banco fb com ibexpert.
valew
Gostei + 0
09/01/2007
Felipemarinho
Const
M = ´PRIMARY KEY´; // OU O NOME DA SUA CHAVE PRIMARIA OU ESTRANGEIRA
begin
Try
// AQUI VOCÊ COLOCA O SEU CODIGO PARA INSERIR OU ALTERAR
Except
On E: EDatabaseError do
Begin
If POS(M,E.Message) > 0 Then
ShowMessage(´SUA MENSAGEM´);
End;
end;
end;
cara espero que tenha ajudado !!!!
obs não esqueca de incluir a unit ´DB´ na clausula uses
Gostei + 0
09/01/2007
Felipemarinho
Gostei + 0
09/01/2007
Ciotti
se tiver me manda no meu email
jeffe_helloween@hotmail.com
valew cara pela força
Gostei + 0
09/01/2007
Ciotti
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)