Subject Re: [firebird-support] Big Problem
Author Dimitry Sibiryakov
On 2 Apr 2004 at 21:24, DB Soluзхes wrote:

> 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.

Firebird automatically convert string values/constants for INSERT
statement, but doesn't do this for procedure parameters.

> 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,

I bet, you call this procedure, using a string as value for
PAGINAS. That's not good. If you declare it BLOB, you have to provide
it with blob_id.

> STATUS SMALLINT)

SY, Dimitry Sibiryakov.