Help with Blob and LoadFromStream

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rcmz
Posts: 15
Joined: Wed 12 Mar 2008 05:58

Help with Blob and LoadFromStream

Post by rcmz » Thu 29 May 2008 06:51

Hi,

Im using D2007, IBDAC 2.0, FB2.1

The stream option of Qdocs is set to True

The field LAYOUT is set to Blob Subtype Binary but I also tried it as SubType TEXT.

This is my code:

Code: Select all

With Qdocs do
        SQL.Text := 'INSERT INTO Cartas(IDCARTA, '+
                              'Tipo, CveCarta, Layout, cEmpresa) '+
                      'Values (NEXT VALUE FOR GEN_CARTAS_ID,'+
                                ':Tipo, :CveCarta, :Layout, :cEmpresa) ';

        ParamByName('TIPO').AsString     := Etipo.Text;
        ParamByName('CVECARTA').AsString := Ecarta.Text;
        ParamByName('LAYOUT').LoadFromStream(sSTream, ftBlob);
        ParamByName('cEmpresa').AsString := GuEmpresa;
        Prepare;
        Execute;
        Unprepare;
end
I get the next error:
Dynamic SQL Error
SQL error code = -303
arithmetic exception, numeric overflow, or string truncation.

Can you please correct my code or tell me what and where to change.

TIA
Ramiro

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 29 May 2008 08:47

We could not reproduce the problem. Please send to ibdac*crlab*com a complete small sample that demonstrates the problem, including the script for creating database objects.

Also specify the exact version of IBDAC including build number (see InterBase | About IBDAC in the Delphi menu).

rcmz
Posts: 15
Joined: Wed 12 Mar 2008 05:58

Post by rcmz » Thu 29 May 2008 20:18

Hi,

Sorry, it was an error on my part.

All is ok now.

Thx.

Post Reply