I have created a table like this:
CREATE TABLE photo (
I want to insert values ! But how ?
For example, I want to insert an image named nic.jpg which is in the directory C:\Oracle .... What must I do to insert the value in the table ?
blobs can be manipulated using pl/sql. i don't remember the exact syntaxes and commands for this. you can refer the documentations for this.
u have to first insert data like this...
Insert into <
use empty_blob() function for blob column...
and then write a procedure to insert data...
I am sending u my procedure Please manipulate it accordingly....
CRETE OR REPLACE PROCEDURE V_LOAD AS
a_file bfile := BFILENAME('TEST', 'ITS1.GIF');
> set BLOB_FILE = empty_Blob()
where BLOB_ID = 1
returning BLOB_FILE into ac;
amount := F_LEN ;
DBMS_LOB.LOADFROMFILE(ac, a_file, amount);
>set BLOB_FILE = ac
where BLOB_ID = 1;
this table has got only two fields....blob_file and blob_id...
then u can access this data with the help of query...
There is a perl script you can use, which will do it.. requires to to install DBD and DBI (oracle driver) to use it... then it's fairly easy to use.
I've seen it on several personal web sites... sorry I don't have it myself, I seem to have lost my copy.
usually the name is blob.pl
Click Here to Expand Forum to Full Width