Help with Blob and LoadFromStream
Posted: 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:
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
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
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