Subject | Inserting binary data into BLOB with SQL statement? |
---|---|
Author | Joe Martinez |
Post date | 2006-01-12T03:44:38Z |
How can I insert a record into a table with a BLOB field, if the BLOB
field needs to contain binary (non-text) data?
For example, I have a table with the following definition:
CREATE TABLE INFOSHEETS (
CLASSID INTEGER NOT NULL
, SHEETTEXT BLOB( 65535, 0 )
, CONSTRAINT INFOSHEETSPK
PRIMARY KEY ( CLASSID )
)
I want to insert a row with the following data:
CLASSID: 5
SHEETTEXT: 00 0B 14 5H 23 9A
(where that above data in SHEETTEXT is not literal text, but 5 binary
bytes represented above in hexadecimal)
How would I do that with a SQL statement (such as with DSQL)?
Thanks,
Joe
field needs to contain binary (non-text) data?
For example, I have a table with the following definition:
CREATE TABLE INFOSHEETS (
CLASSID INTEGER NOT NULL
, SHEETTEXT BLOB( 65535, 0 )
, CONSTRAINT INFOSHEETSPK
PRIMARY KEY ( CLASSID )
)
I want to insert a row with the following data:
CLASSID: 5
SHEETTEXT: 00 0B 14 5H 23 9A
(where that above data in SHEETTEXT is not literal text, but 5 binary
bytes represented above in hexadecimal)
How would I do that with a SQL statement (such as with DSQL)?
Thanks,
Joe