Fórum problemas na ativacao da procedure #531431

11/09/2015

0

tenho o seguinte código

procedure TFrmControleCliente.Button2Click(Sender: TObject);

var i: integer;
begin

Label20.Caption:= '';

PBconout.Max:= 0;
PBconout.Position:= 0;


//Pegando a quantidade de Querys existentes, pra definir o MAX
for i:= 0 to DM.ComponentCount - 1 do
if DM.Components[i].ClassType = TAdoQuery then
PBconout.Max:= PBconout.Max + 1;

for i:= 0 to DM.ComponentCount - 1 do
if TADoQuery(DM.Components[i]).ClassType = TADOQuery then
begin
TADoQuery(DM.Components[i]).Connection.Connected:= False;
TADoQuery(DM.Components[i]).Active:= False;
TADoQuery(DM.Components[i]).Connection := TADOConnection(DM.FindComponent(CBEmpresas.Items[ CBEmpresas.ItemIndex]) );
TADoQuery(DM.Components[i]).Connection.Connected:= True;
if (TADOQuery(DM.Components[i]).Name <> 'qryCommand') then
TADoQuery(DM.Components[i]).Active:= True;

PBconout.PBconout:= PBconout.Position + 1;
Application.ProcessMessages;


end;


Label20.Caption:= 'Conexões efetuadas corretamente - Servidor ['+CBEmpresas.Items[CBEmpresas.ItemIndex]+']';




end;


ele ta apresentando os seguintes erros:

[dcc32 Error] UClienteControle.pas(190): E2003 Undeclared identifier: 'PBconout'
Tiago Santos

Tiago Santos

Responder

Posts

16/09/2015

Luiz Freitas

tenho o seguinte código

procedure TFrmControleCliente.Button2Click(Sender: TObject);

var i: integer;
begin

Label20.Caption:= '';

PBconout.Max:= 0;
PBconout.Position:= 0;


//Pegando a quantidade de Querys existentes, pra definir o MAX
for i:= 0 to DM.ComponentCount - 1 do
if DM.Components[i].ClassType = TAdoQuery then
PBconout.Max:= PBconout.Max + 1;

for i:= 0 to DM.ComponentCount - 1 do
if TADoQuery(DM.Components[i]).ClassType = TADOQuery then
begin
TADoQuery(DM.Components[i]).Connection.Connected:= False;
TADoQuery(DM.Components[i]).Active:= False;
TADoQuery(DM.Components[i]).Connection := TADOConnection(DM.FindComponent(CBEmpresas.Items[ CBEmpresas.ItemIndex]) );
TADoQuery(DM.Components[i]).Connection.Connected:= True;
if (TADOQuery(DM.Components[i]).Name <> 'qryCommand') then
TADoQuery(DM.Components[i]).Active:= True;

PBconout.PBconout:= PBconout.Position + 1;
Application.ProcessMessages;


end;


Label20.Caption:= 'Conexões efetuadas corretamente - Servidor ['+CBEmpresas.Items[CBEmpresas.ItemIndex]+']';




end;


ele ta apresentando os seguintes erros:

[dcc32 Error] UClienteControle.pas(190): E2003 Undeclared identifier: 'PBconout'


Olá!

Tente trocar a linha:
PBconout.PBconout:= PBconout.Position + 1;


por:
PBconout.Position := PBconout.Position + 1;
Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar