Subject Re: [firebird-support] Re: bin to blob?
Author Martijn Tonies
q: TIB_DSQL;

q.SQL.Add('INSERT INTO IMAGES (IMGCODE, IMGDESC, IMGBMP)');
q.SQL.Add(' VALUES(''2D'',''2nd double'', :imgbmpparam)');
q.Prepare;
q.ParamByName('imgbmpparam').LoadFromFile(filename);
q.Execute;


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com


> Could you show me an example of this, please?
>
> Daniel
>
>
>
> --- In firebird-support@yahoogroups.com, "Martijn Tonies"
> <m.tonies@u...> wrote:
> >
> >
> >
> > > I only want to store bmp images in a table.
> > >
> > > using SQL
> > >
> > > INSERT INTO IMAGES (IMGCODE, IMGDESC, IMGBMP)
> > > VALUES('2D','2nd double','c:\images\2D.bmp');
> > >
> > > imgbmp being a blob field in the table images
> >
> > But why via a script?
> >
> > You can do this easily with single statements, preparing them
> > and assigning the blob data to a parameter.
> >
> > With regards,
> >
> > Martijn Tonies
> > Database Workbench - the developer tool for InterBase & Firebird
> > Upscene Productions
> > http://www.upscene.com
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>