Subject | Re: [ib-support] LOAD EXTERNAL FILE FOR FIREBIRD BLOB |
---|---|
Author | Helen Borrie |
Post date | 2002-06-17T12:48:09Z |
At 10:50 AM 17-06-02 +0300, Ibrahim Bulut wrote:
columns; and it can accept a string as input to a blob column in an SQL
INSERT or UPDATE statement. Everything it does, it does with SQL. You
can't load data into the database with a SELECT statement, either, except
when inserting into or updating one table by sub-selecting from another table.
Also, the database doesn't save any data as "files". It stores and manages
blob data on database pages, within the database file itself.
managing metadata.
The sub_types available to the programmer are sub_type 0 (generally, any
streamed data, typically binary) and sub_type 1 (text).
You can also create your own sub_types by writing one or more blob filters
- a specialised UDF that picks up blob data stored in a particular format
and converts it (for output or storage) to another format. For example,
you could have a blob column in which you always store bitmapped images and
you could write a blob filter to convert them to JPEG or GIF. Where they
differ from UDFs is that you declare them to the database as blob
sub-types, rather than as functions.
Delphi is rich with features for converting streamed data (from memory or
from files) into blobs and then you just pass them to the database as
blob. IB Objects has some highly specialised methods for doing it
directly. I won't go into the details here as it's off-topic. Consult the
Delphi help and the Borland knowledgebase, on both blobs and streams.
heLen
All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________
>hiNo. The database can handle an external file with rows in fixed length
>we are using firebird and delphi 5 ent.
>we have a problem.
>
>There is an external file which name is ('C:\MyTextFiles\Report.Dfm').
>
>in delphi, we can load this file into a memo
>Memo1.Loadfromfile('C:\MyTextFiles\Report.Dfm').
>
>Can we do it with firebirdsql.
>Like
>Select Loadfile('C:\MyTextFiles\Report.Dfm') from rdb$database;
>
>Database will find the file, and load it to a text blob file.
columns; and it can accept a string as input to a blob column in an SQL
INSERT or UPDATE statement. Everything it does, it does with SQL. You
can't load data into the database with a SELECT statement, either, except
when inserting into or updating one table by sub-selecting from another table.
Also, the database doesn't save any data as "files". It stores and manages
blob data on database pages, within the database file itself.
>in ibconsole,The database engine uses several different blob sub-types for massaging and
>when i was browsing the RDB$RELATIONS table,
>i saw a domain
>CREATE DOMAIN RDB$EXTERNAL_DESCRIPTION AS BLOB SUB_TYPE
>EXTERNAL_FILE_DESCRIPTION SEGMENT SIZE 80;
>can we load external file with this blob type
managing metadata.
The sub_types available to the programmer are sub_type 0 (generally, any
streamed data, typically binary) and sub_type 1 (text).
You can also create your own sub_types by writing one or more blob filters
- a specialised UDF that picks up blob data stored in a particular format
and converts it (for output or storage) to another format. For example,
you could have a blob column in which you always store bitmapped images and
you could write a blob filter to convert them to JPEG or GIF. Where they
differ from UDFs is that you declare them to the database as blob
sub-types, rather than as functions.
Delphi is rich with features for converting streamed data (from memory or
from files) into blobs and then you just pass them to the database as
blob. IB Objects has some highly specialised methods for doing it
directly. I won't go into the details here as it's off-topic. Consult the
Delphi help and the Borland knowledgebase, on both blobs and streams.
heLen
All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________