-
LONG, CLOB & cie
I have a big problem to resolve.
First i'd got a table like that :
number id
number pageid
varchar2(32) type
long properties
I wanted to add a record that contained a very long property (an image). The problem was that i couldn't add more than 4000 octets because of LONG field
(see http://support.microsoft.com/default...NoWebContent=1)
So I tried to execute several queries using CONCAT function to store my bitmap. But LONG field doesn't support concatenation.
Finally I decided to change my LONG to a CLOB. I tried an ALTER TABLE command but it didn't work.
I thought I had to use tempory table to do it so I did something like this :
CREATE TABLE tmp ([....],properties CLOB NOT NULL)
INSERT INTO tmp SELECT * FROM objet
DROP TABLE objet
CREATE TABLE objet ([....],properties CLOB NOT NULL)
INSERT INTO objet SELECT * FROM tmp
It worked.
I started my application (using .NET Microsoft.Data.ODBC) but I wasn't able to get any row.
I tried to use the TO_LOB function in my previous script. It worked too but had no result too.
I verified the problem the 'Oracle ODBC test' but I perfectly saw my record using SqlPlus.
Do you have any simple solution to store an image in my database using ODBC and without loosing my data in the 'objet' table ?
Thank you for your help !
-
Blob Problem.
I have the same problem, If u solve yours, can u explain the way to me?
Also I have another problem, - how can i insert into BLOB(CLOB) field a file from filesystem? I've read many docs about Oracle 9i, but i didn't find yet the solvation of my problem...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|