what type is allowed for oracle BLOB

prashantSum's Avatar
Contributor
what type of data is allowed for blob?

Is it only 0's and 1's as the name implies.

but I am able to insert 0-9 and a-f through sql* plus. why is it so?
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by prashantSum
but I am able to insert 0-9 and a-f through sql* plus. why is it so?
Its not restricted to 0's and 1's but its the way they are stored. 0-9 and a-f can also be represented in 0's and 1's form and stored in that fashion.
0
prashantSum's Avatar
Contributor
thanks for the reply,

I am unable to insert data other than 0-9 and a-f into BLOB, as it is giving 'ORA-00911: invalid character' message.
So does it only allow Hexadecimal numbers.

If so, why it is allowing Hexadecimal numbers when it's name is Binary LOB?

And one more thing when I take a word document as InputStream through JDBC and insert it into BLOB how I am able to insert word document into BLOB, as word document contains characters other than 0-9 and a-f.

I am not getting low level clarity as how data is managed in BLOB, can you give some clarity on this.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by prashantSum
I am unable to insert data other than 0-9 and a-f into BLOB, as it is giving 'ORA-00911: invalid character' message.
So does it only allow Hexadecimal numbers.
Actually it allows the characters represented in the Hex form and not only the Hex characters. Even Z can be represented as binary value and has a Hex equivalent.
Quote:
Originally Posted by prashantSum
If so, why it is allowing Hexadecimal numbers when it's name is Binary LOB?
Because there is a relation between Hex and binary and hex is just a way to represent binary data in a convenient manner.
Quote:
Originally Posted by prashantSum
And one more thing when I take a word document as InputStream through JDBC and insert it into BLOB how I am able to insert word document into BLOB, as word document contains characters other than 0-9 and a-f.
Because you are representing each bytes into binary values.
0
mikestewart's Avatar, Join Date: Jul 2006
Newbie Member
Me too I would like to know aswell
0
mikestewart's Avatar, Join Date: Jul 2006
Newbie Member
Quote:
Originally Posted by prashantSum
thanks for the reply,

I am unable to insert data other than 0-9 and a-f into BLOB, as it is giving 'ORA-00911: invalid character' message.
So does it only allow Hexadecimal numbers.

If so, why it is allowing Hexadecimal numbers when it's name is Binary LOB?

And one more thing when I take a word document as InputStream through JDBC and insert it into BLOB how I am able to insert word document into BLOB, as word document contains characters other than 0-9 and a-f.

I am not getting low level clarity as how data is managed in BLOB, can you give some clarity on this.
Me too I would like to know aswell
0
mikestewart's Avatar, Join Date: Jul 2006
Newbie Member
Quote:
Originally Posted by prashantSum
thanks for the reply,

I am unable to insert data other than 0-9 and a-f into BLOB, as it is giving 'ORA-00911: invalid character' message.
So does it only allow Hexadecimal numbers.

If so, why it is allowing Hexadecimal numbers when it's name is Binary LOB?

And one more thing when I take a word document as InputStream through JDBC and insert it into BLOB how I am able to insert word document into BLOB, as word document contains characters other than 0-9 and a-f.

I am not getting low level clarity as how data is managed in BLOB, can you give some clarity on this.
ooo
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by mikestewart
Me too I would like to know aswell
Try http://ora-00911.ora-code.com/