Subject Big Problem
Author DB² Soluções
I have a problem with a database of one of my clients. It´s the same
database as all the other clients but when I call the following procedure,
I
get "Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements. internal error." But when I
do the insert outside the procedure, it works just fine.
I've already done 4 backup/restore using these parameters:

gfix -v -f GCA.GBD -user SYSDBA -pass masterkey

gfix -m -i GCA.GBD -user SYSDBA -pass masterkey

gbak -g -l -b -z -v GCA.GDB GCABACK090402.GBK -user SYSDBA -pass
masterkey

gbak -c -r -z -v GCABACK090402.GBK GCA3.GDB -user SYSDBA -pass
masterkey

and it still gives the error, even with the fax table being empty.

any help is welcome

CREATE TABLE FAX (
ID_FAX "KEY",
ID_DOCUMENTO "KEY",
NUMERO_ENVIO VARCHAR_20,
ID_USUARIO INTEGER,
PAGINAS_TOTAL INTEGER,
PAGINAS BLOB_TEXT, /* BLOB SUB_TYPE 1 SEGMENT SIZE 10 */
DATA_HORA TIMESTAMP,
STATUS NUMPEQUENO,
ID_SISTEMA_FAX "KEY" NOT NULL
);


procedure:

CREATE PROCEDURE GERENCIA_FAX(
ACT INTEGER,
ID_FAX INTEGER,
ID_USUARIO INTEGER,
ID_DOCUMENTO INTEGER,
ID_SISTEMA_FAX INTEGER,
NUMERO_ENVIO VARCHAR(20),
PAGINAS_TOTAL INTEGER,
PAGINAS BLOB SUB_TYPE 1 SEGMENT SIZE 10,
STATUS SMALLINT)
AS
begin
if (ACT = 0) then
begin
insert into
FAX (
ID_USUARIO,
ID_DOCUMENTO,
ID_SISTEMA_FAX,
NUMERO_ENVIO,
PAGINAS_TOTAL,
PAGINAS,
STATUS)
values (
:ID_USUARIO,
:ID_DOCUMENTO,
:ID_SISTEMA_FAX,
:NUMERO_ENVIO,
:PAGINAS_TOTAL,
:PAGINAS,
:STATUS);
end
else if (ACT = 1) then
begin
update FAX set STATUS = :STATUS where ID_FAX = :ID_FAX;
end
end


Gustavo Büchle
Desenvolvimento
DB² Soluções
(51) 99518712