Subject | Re: [firebird-support] Re: Hex string literal, blob not supported for conversion? |
---|---|
Author | Martijn Tonies (Upscene Productions) |
Post date | 2015-08-31T14:31:38Z |
Hello Dmitry,
CREATE TABLE BMP_BLOBS
(
ID INTEGER NOT NULL,
BMP BLOB SUB_TYPE 0 SEGMENT SIZE 80,
"COMMENT" VARCHAR( 20) COLLATE ISO8859_1,
CONSTRAINT PK_BMP_BLOBS PRIMARY KEY (ID)
);
insert into BMP_BLOBS
values (-1, X'101010', 'test')
How is the declared function any different?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
>> I wonder, should this be possible:This works:
>> select f_blobsize(X'10')
>> from rdb$database
>> DECLARE EXTERNAL FUNCTION F_BLOBSIZE
>> BLOB
>> RETURNS INTEGER FREE_IT
>> ENTRY_POINT 'blobsize' MODULE_NAME 'FreeAdhocUDF';
>> I’m getting this error:
>> “ feature is not supported BLOB and array data types are not supported
>> for conversion operation “
>> But as far as I can see, X’10’ returns a binary string, a blob?
>
>X'10' means a binary string (char octets) but this is not a blob. AFAIU,
>the char->blob conversion is impossible in this context.
CREATE TABLE BMP_BLOBS
(
ID INTEGER NOT NULL,
BMP BLOB SUB_TYPE 0 SEGMENT SIZE 80,
"COMMENT" VARCHAR( 20) COLLATE ISO8859_1,
CONSTRAINT PK_BMP_BLOBS PRIMARY KEY (ID)
);
insert into BMP_BLOBS
values (-1, X'101010', 'test')
How is the declared function any different?
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!