Fórum Pedidos com mesmo COdigo #412608
10/02/2012
0
Alguma solução...
y := 0;
While y < 60 do
begin
if y = 5 then
begin
vQuerySql.Close;
ShowMessage(Não foi possível concluir a Inclusão. + chr(13) + Tente Novamente);
LiberarBtn;
exit;
end;
try
DM.TB_Contadores.Open;
if not DM.TB_Contadores.FindKey([1]) then
begin
ShowMessage(Erro no Contador);
exit;
end;
vContador := DM.TB_Contadores.FieldByName(vCampoChave1).asInteger;
DM.TB_Contadores.Edit;
DM.TB_Contadores.FieldByName(vCampoChave1).asInteger :=
DM.TB_Contadores.FieldByName(vCampoChave1).asInteger+1;
DM.TB_Contadores.Post;
DM.TB_Contadores.Close;
//
VQuerySql.Close;
vQuerySql.ParamByName(vCampoChave1).asString := IntToStr(vContador);
vQuerySql.Open;
if vQuerySql.IsEmpty then
begin
vQuerySql.Append;
break;
end;
except
Inc(y);
DM.TB_Contadores.Close;
Continue;
end;
//
Inc(y);
end;
vQuerySql.FieldByName(vCampoChave1).asString := IntToStr(vContador);
Decio Neto
Curtir tópico
+ 0Posts
10/02/2012
William
Gostei + 0
10/02/2012
Decio Neto
alguma ideia
Gostei + 0
10/02/2012
William
Gostei + 0
13/02/2012
Joel Rodrigues
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)