Subject | Re: Converting a JPEG to a blob... |
---|---|
Author | Thomas Kellerer |
Post date | 2006-09-23T14:22:41Z |
--- In firebird-support@yahoogroups.com, "Martijn Tonies" >
based) can do that completely on the client side with a special SQL
syntax very similar to the UDF solution.
But as the code is executed on the client side, the application will
take care of "uploading" the BLOB to the server (and directly into the
column).
INSERT INTO theTable (id, blob_col)
VALUES
(42,{$blobfile=c:/data/image.bmp});
This works for any database where the JDBC driver implements the
necessary functions, including Firebird. This can also be run in batch
mode.
The same syntax can also be used to "upload" files into CLOB columns
Although I'm not sure which datatype that would be for Firebird. Does
Firebird have a character datatype that can hold more than 32K?
Anyone interested, can download the application at:
http://www.sql-workbench.net
Thomas
> No, cause I know how it will work -- I'm just trying to set thingsMy SQL Workbench/J (similar tool as your Database Workbench but Java
> straight for people who might have thought that it would work locally
> from a script.
based) can do that completely on the client side with a special SQL
syntax very similar to the UDF solution.
But as the code is executed on the client side, the application will
take care of "uploading" the BLOB to the server (and directly into the
column).
INSERT INTO theTable (id, blob_col)
VALUES
(42,{$blobfile=c:/data/image.bmp});
This works for any database where the JDBC driver implements the
necessary functions, including Firebird. This can also be run in batch
mode.
The same syntax can also be used to "upload" files into CLOB columns
Although I'm not sure which datatype that would be for Firebird. Does
Firebird have a character datatype that can hold more than 32K?
Anyone interested, can download the application at:
http://www.sql-workbench.net
Thomas