Dynamic SQL Error
SQL error code = -204
Procedure unknown
GET_A02ATRIB
At line 1, column 75
Abra o IBExpert
Conect o banco e abra o editor de procedures com CTRL+F12
Verifique se a opção "Use Current Connect" esta marcada.
Cole a procedure GET_A02ATRIB e dê um F9
SLQ GET_A02ATRIB:
CREATE OR ALTER PROCEDURE GET_A02ATRIB (
empresa integer,
mercadoria integer)
returns (
tbseq integer,
tbdesc varchar(30),
tbcfo integer,
tbuf char(2),
tbcst_icms smallint,
tbcst_ipi smallint,
tbcst_pis smallint,
tbcst_cofins smallint,
tbicms numeric(15,2),
tbicmssub numeric(15,2),
tbbasred numeric(15,4),
tbipi numeric(15,2),
tbpis numeric(15,2),
tbcofins numeric(15,2),
tbissqn numeric(15,4),
tbacum varchar(5),
md5 varchar(32))
as
declare variable tbseq_temp integer;
begin
select coalesce(metrib, m.metrib)
from a02amerc m
left join a02apre on meemp = :empresa and mecod = m.mecod
where m.mecod = :mercadoria
into :tbseq_temp;
select tbseq, tbdesc, tbcfo, tbuf, tbcst_icms, tbcst_ipi, tbcst_pis, tbcst_cofins, tbicms,
tbicmssub, tbbasred, tbipi, tbpis, tbcofins, tbissqn, tbacum, md5
from a02atrib
where tbseq = :tbseq_temp
into :tbseq, :tbdesc, :tbcfo, :tbuf, :tbcst_icms, :tbcst_ipi, :tbcst_pis, :tbcst_cofins, :tbicms,
:tbicmssub, :tbbasred, :tbipi, :tbpis, :tbcofins, :tbissqn, :tbacum, :md5;
suspend;
end

Em alguns usuários aparecerá outro erro ao abrir o apcon:
no permission for execute access to PROCEDURE GET_A02ATRIB
Abra o CTRL+F12 novamente e digite estas duas procedures:
GRANT EXECUTE ON PROCEDURE GET_A02ATRIB TO ADMGER;
GRANT EXECUTE ON PROCEDURE GET_A02ATRIB TO PISTA;
Finalizado, abra novamente o APCONW que irá funcionar normalmente.



Sped C490 - Bahia
Abastecimento Corrompido
Sintegra Reg54
Erros na versão 197
Erros na versão 198
XML em erros
Erro ao importar notas v197
List index out of bounds (3)
0 comentários:
Postar um comentário