Can anybody explain me how could I make a parameter binding with DBExpress
for inserting an Oracle 8.x BLOB field ?
Shortly, I want to write a binary file into BLOB field. All I have done
until now didn't work.
Any source of information will be wellcome
Thanks.
Mihai
Bind p1 and p2 as ftOraBlob and ftOraClob respectively.
T.Ramesh.
Mihai Togan wrote:
--
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of
this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto, is
strictly prohibited. If you have received this e-mail in error, please
immediately and permanently delete the original and any copy of any
e-mail and any printout thereof.
Accelerate your Linux® application development with Kylix(TM), the RAD
tool for Linux. Easily integrate web, desktop and database development
to quickly deliver fast Linux applications. Kylix is the only Linux
development tool that combines the world's fastest compiler with the
most productive visual design environment for GUI, web and database
programming. Order your copy now!
http://www.borland.com/kylix/
procedure TForm1.Button1Click(Sender: TObject);
var sSql:string;
params:TParams;
mstrm:TMemoryStream;
begin
mstrm:=TMemoryStream.Create;
mstrm.LoadFromFile('filename');
mstrm.Position :=0;
params:=TParams.Create;
params.CreateParam(ftOraBlob,'p1',ptInput);
sSql:='Insert Into MyTable ( Id, blobfield) Values( 61,
EMPTY_BLOB()) Returning blobfield into :p1';
DataModule1.SQLConnection1.Execute(sSql, params,nil);
params.ParamByName('p1').SetBlobData(mstrm.Memory,mstrm.Size);
params.Free;
mstrm.Free;
end;
When I execute this code, it makes an insertion af an record into Oracle
MyTable table with Id=61 but the BLOB filed is empty. Can you tell me what
is wrong? Any idea ?
Thanks,
Mihai.