Subject Re: [IBO] Inserting blobs
Author stahlberger@t-online.de
Thijs,
this works (as far as i know):

first make your column assignable:

procedure TFormPicture.FormActivate(Sender: TObject);
begin
MyPictureColumn := TIB_Column(qryPic.FieldByName( 'PData'));
if not qryPic.prepared then qryPic.prepare;
qryPic.open;
end;


try
qryPic.insert;
qryPic.FieldByName('PTitle').AsString := filename;
ImageEn1.LoadFromFile(filename);
MyPictureColumn.Assign(imageen1.Bitmap); // <---- assign
qryPic.Post;
qryPic.refreshall;
filename:='';
Application.ProcessMessages;
finally
btnLoad.Enabled := true;
btnCancel.Caption := 'Close';
end;
qryPic.refresh;

Greetings Christian

----- Original Message -----
From: ing. Thijs Kuperus <thijs@...>
To: <IBObjects@egroups.com>
Sent: Tuesday, January 23, 2001 5:20 PM
Subject: [IBO] Inserting blobs


> Hi there,
>
> I was wondering if anybody knows a quick way of inserting blobs into a
> table.
>
> I noticed it's not possible to insert the blobs using a normal
> INSERT INTO query.. Something bout a blob cursor that's missing.. So my
work
> around is to use the append on a IBOQuery... but it makes something like
> batch inserts a hassle...
>
> Anyone?
>
> Thijs
>
>
>
>