Fórum erro no codigo que nao consigo achar #437188
15/03/2013
0
arqema.sql.add(''from fpd005 where emails is not null'');
if maskedit1.text <> '''' then
begin
arqema.sql.add(''and codfun=:wcodfun'');
arqema.parambyname(''wcodfun'').asinteger := strtoint(maskedit1.text);
end;
if checkbox4.checked = false then
begin
arqema.sql.add(''and datres is null'');
end;
ESTA DANDO ERRO NO PARAMENTRO WCODFUN. ALGUEM POR FAVOR PODE OLHAR O QUE ESTA ERRADO, POIS EU ATÉ AGORA NÃO ACHEI.
OBRIGADO
"DEUS ABENÇOE"
Wilton Júnior
Curtir tópico
+ 0Posts
15/03/2013
William
"from fpd005 where emails is not null "
Gostei + 0
15/03/2013
Joel Rodrigues
Gostei + 0
15/03/2013
Wilton Júnior
Parameter 'wcodfun' not found.
Eu não vi erro. ta muito esquisito
Gostei + 0
15/03/2013
Wilton Júnior
Gostei + 0
15/03/2013
Francisco Macário
arqema.sql.add(''from fpd005 where emails is not null'');
if maskedit1.text <> '''' then
begin
arqema.sql.add(''and codfun=:wcodfun'');
arqema.parambyname(''wcodfun'').asinteger := strtoint(maskedit1.text);
end;
if checkbox4.checked = false then
begin
arqema.sql.add(''and datres is null'');
end;
ESTA DANDO ERRO NO PARAMENTRO WCODFUN. ALGUEM POR FAVOR PODE OLHAR O QUE ESTA ERRADO, POIS EU ATÉ AGORA NÃO ACHEI.
OBRIGADO
"DEUS ABENÇOE"
Olá.
Pode ser por que você esta passando valor para o parametro sem ter terminado de montar a instrução SQL.
Repondo seu código.
arqEma.sql.add(' select');
arqEma.sql.add(' CODFUN as CODDES, NOMFUN as NOMDES, EMAILS as ENDELE,');
arqEma.sql.add(' '+QuotedStr('''')+ 'as ENDALT, CIDFUN as CIDDES, ESTFUN as ESTDES');
arqEma.sql.add(' from');
arqEma.sql.add(' FPD005');
arqEma.sql.add(' where');
arqEma.sql.add(' EMAILS is not null');
if maskedit1.text <> '''' then
begin
arqEma.sql.add(' and CODFUN = :wcodfun');
end;
if checkbox4.checked = false then
begin
arqEma.sql.add(' and DATRES is null');
end;
if maskedit1.text <> '''' then
begin
arqEma.parambyname('wcodfun').AsInteger := strtoint(maskedit1.text);
end;
Gostei + 0
15/03/2013
Joel Rodrigues
Sendo assim, estou marcando este tópico como Concluído.
Abraço a todos.
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)