Subject | Re: [firebird-support] Update Blob type 2 |
---|---|
Author | Gordon Niessen |
Post date | 2011-07-26T02:15:01Z |
On 7/25/2011 5:15 PM, Helen Borrie wrote:
Can I change it without losing data already in the field?
I did see the declaration for filters. And I can write a UDF style
function to do that. But was looking to see if there was something I
could do within the existing system. The fields are meant to hold
notes. But they may also hold rich text data. But it seemed like FB
1.5 was allowing a statement like:
update hdw_table set blob_notes = 'Test Notes' where hdw_id = 12345;
--
Thanks,
Gordon
[Non-text portions of this message have been removed]
>Yes, I meant Sub-type 2. I don't know why it was used for this field.
> At 08:59 AM 26/07/2011, you wrote:
> >I am using FB 2.5 and I have a Blob type 2 field and I am trying to
> >update it with a string value. I am getting an error that "filter not
> >found to convert type 1 to type 2". How can I create that filter or
> >pre-define the data to update the blob?
>
> Do you mean sub_type 2? If so, it's not available for updating by
> users - it is a system BLOB (can't say which one without checking
> docs...there are lots of blobs in the metadata, all sub_types 2 and
> higher).
>
> If you want to use sub_types for specific purposes, define them as a
> sub_type of less than zero. Blob filters are a special category of
> external function that you can write (in a language that can export
> dynamic libs with CDECL calling convention, like a UDF) to have the
> contents of one sub_type converted to another sub_type. You declare
> them in the database, similarly to the way you declare UDFs.
>
> Better you describe what you are trying to do here...
>
> ./hb
>
>
>
Can I change it without losing data already in the field?
I did see the declaration for filters. And I can write a UDF style
function to do that. But was looking to see if there was something I
could do within the existing system. The fields are meant to hold
notes. But they may also hold rich text data. But it seemed like FB
1.5 was allowing a statement like:
update hdw_table set blob_notes = 'Test Notes' where hdw_id = 12345;
--
Thanks,
Gordon
[Non-text portions of this message have been removed]