Home » Developer & Programmer » Forms » image uploading using bfile data type (oracle 10g, xp)
image uploading using bfile data type [message #408607] Wed, 17 June 2009 01:19 Go to next message
myclassic
Messages: 127
Registered: December 2006
Location: Pakistan
Senior Member
Dear all

purpose : I want to upload image of all my employees in my db. but DB becomes slow. So i want to upload only path/locator etc. and want to store images in a folder on some drive of my hard disk. and i want to let my application read image at run time.

what i did:::::
Created a table having a column of BFile datatype.
Create table xyz as select * from scott.emp;

alter table xyz
add pic bfile;

desc xyz
Name Null? Type
------------------------------- -------- ----
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
PIC BINARY FILE LOB


Created a directory.
create directory pics as 'E:\Pics';
create directory pics as '\\E\Pics';---tried both options

created a folder at same location. placed a jpg in it.

inserted values in table
insert into xyz values(1234, 'Asad','CLERK',7902,
sysdate, 800, null, 20,bfilename('PICS','1234.jpg'));
commit;


but it is not displayed on form.
what is error and how can it be handled.

regards.
Re: image uploading using bfile data type [message #409499 is a reply to message #408607] Mon, 22 June 2009 23:21 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Okay, you have told us how you are putting records into the database. How are you getting them out of the database?

David
Previous Topic: serial sorting
Next Topic: Image in Radio Button
Goto Forum:
  


Current Time: Sat Dec 03 16:15:19 CST 2016

Total time taken to generate the page: 0.04860 seconds