[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 594: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 650: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
Fórum Xmaker • Rotina de carga
Página 1 de 1

Rotina de carga

Enviado: Junho 20th, 2011, 9:44 pm
por megafsem
Ola

begin
TabGlobal.DITECOMPPROD.filtro.Clear;
tabGlobal.DITECOMPPROD.filtro.add('ITECOMPPROD.PRO_CODIGO =' (tabGlobal.DITECOMPPROD.PRO_CODIGO));
TabGlobal.DITECOMPPROD.AtualizaSql;
tabglobal.DITECOMPPROD.First;
try
while not tabglobal.DITECOMPPROD.Eof do
begin
if Ptabela(TabGlobal.DPRODUTO, ['PRO_CODIGO'], [tabglobal.DITECOMPPROD.PRO_CODIGO.Conteudo], ['CPPRO_CODIGO', 'CP_QUANT'],CamposResultado) then
begin
TabGlobal.DGRADPROD.ECF_NUMERO.Conteudo:= TabGlobal.DITVENDA.ECF_NUMERO.Conteudo ;
TabGlobal.DGRADPROD.CPPRO_CODIGO.Conteudo:= CamposResultado[0];
TabGlobal.DGRADPROD.QUANTPROD.Conteudo:= CamposResultado[1] * TabGlobal.DITVENDA.PRO_QUANTIDADE.Conteudo ;
TabGlobal.DGRADPROD.salva;
Screen.Cursor := crHourGlass;
end;
TabGlobal.DITECOMPPROD.next;
end;
except
showmessage('Erro de Leitura...');
end;
end;

levando en consideração que o campo "ITECOMPPROD.PRO_CODIGO" é um campo alfa de tamanho 20 essa linha a baixo está dando erro.
tabGlobal.DITECOMPPROD.filtro.add('ITECOMPPROD.PRO_CODIGO =' (tabGlobal.DITECOMPPROD.PRO_CODIGO));
poderia orientar onde está o erro.
grato

Re: Rotina de carga

Enviado: Junho 21st, 2011, 8:44 am
por Gustavo
Olá,

na linha onde está sendo atribuído o filtro faltou o sinal + depois do apóstrofo, veja abaixo como tem que ficar:

TabGlobal.DITECOMPPROD.filtro.add('ITECOMPPROD.PRO_CODIGO ='+ (TabGlobal.DITECOMPPROD.PRO_CODIGO));