Hi there
I have some problem.
I'm using DOA version 3.4.6.1, delpfi 6 and oracle 9i
I am in the process of converting a fairly complex BDE-based application to DOA, running against an Oracle 9i database.
Original code(tquery version) is here... it work well...
with TQuery_temp do
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO table (SIMAGE, CRTEMP )');
SQL.Add(' VALUES
SIMAGE, :CRTEMP)');
JpegImage := TJPEGImage.Create;
MS := TMemoryStream.Create;
MS.Position := 0;
JPEGImage.Assign( Temp_Image.Picture.Graphic );
JPEGImage.SaveToStream( MS );
ParamByName( 'SIMAGE' ).LoadFromStream( MS, ftBlob );
ParamByName( 'CRTEMP' ).AsString := UseEmpCd;
ExecSQL;
JPEGImage.Destroy;
MS.Destroy;
end;
and here is oracledataset version
with TOracleDataSet_temp do
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO table (SIMAGE, CRTEMP )');
SQL.Add(' VALUES
SIMAGE, :CRTEMP)');
DeclareVariable('CRTEMP', otString);
DeclareVariable('SIMAGE', otBlob);
fieldbyname('simage').Assign(Temp_Image.Picture.Graphic);
// or TOracleDataSet_tempSIMAGE.Assign(Temp_Image.Picture.Graphic); -- it make same error
setVariable( 'CRTEMP', UseEmpCd );
ExecSQL;
end;
It occur this error message "LOB variable :SIMAGE cannot be nil" !!
I guess that i missed something !! what's wrong????
help me~~
I have some problem.
I'm using DOA version 3.4.6.1, delpfi 6 and oracle 9i
I am in the process of converting a fairly complex BDE-based application to DOA, running against an Oracle 9i database.
Original code(tquery version) is here... it work well...
with TQuery_temp do
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO table (SIMAGE, CRTEMP )');
SQL.Add(' VALUES

JpegImage := TJPEGImage.Create;
MS := TMemoryStream.Create;
MS.Position := 0;
JPEGImage.Assign( Temp_Image.Picture.Graphic );
JPEGImage.SaveToStream( MS );
ParamByName( 'SIMAGE' ).LoadFromStream( MS, ftBlob );
ParamByName( 'CRTEMP' ).AsString := UseEmpCd;
ExecSQL;
JPEGImage.Destroy;
MS.Destroy;
end;
and here is oracledataset version
with TOracleDataSet_temp do
begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO table (SIMAGE, CRTEMP )');
SQL.Add(' VALUES

DeclareVariable('CRTEMP', otString);
DeclareVariable('SIMAGE', otBlob);
fieldbyname('simage').Assign(Temp_Image.Picture.Graphic);
// or TOracleDataSet_tempSIMAGE.Assign(Temp_Image.Picture.Graphic); -- it make same error
setVariable( 'CRTEMP', UseEmpCd );
ExecSQL;
end;
It occur this error message "LOB variable :SIMAGE cannot be nil" !!
I guess that i missed something !! what's wrong????
help me~~