About Bfile [message #369763] |
Thu, 05 October 2000 14:12 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Suresh.N
Messages: 41 Registered: March 2000
|
Member |
|
|
Hi!
I tried to Store Bfile. But I could't succeed..
I created a dir also.
Can u tell me how to use bfile.
With one example..
In sql We can not display..
If suppose i store some image using bfile how to display in form..
Thanks in Advance
Suresh
|
|
|
Re: About Bfile [message #369767 is a reply to message #369763] |
Fri, 06 October 2000 02:28 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Prem
Messages: 79 Registered: August 1998
|
Member |
|
|
Suresh,
Bfile is just a reference to the OS file. It does not store the contents of the file.
Several reasons for your bfile command to fail.
* Does the os folder on the server exists?
* You may not be having privilege on the os directory on which you have created the oracle directory
* Is the os directory you have mapped on the server running the oracle database? It can only see the drives and folders on the server's os and not the client. If you need to, then you'll have to map your machine's drive on the server.
Assume there is a folder called images on C:\ on the database server. So the mapping should be for c:\images
You'll have to first create a directory in oracle to point to c:\images.
in the plsql block or procedure you can use it as
TBFILE BFILE := BFILENAME('IMG_DIR','test.jpg');
I think the file names are case sensitive. So that might be another reason for it to fail.
You can use the tbfile local variable for your inserts /updates.
hth
Prem :)
|
|
|