access to BFile

nailuj

Member
Hi!
sorry mi bad english, i'm spanish.

i have a table with a BFile field.
What is the better way to insert,read and modify a file in a bfile field.

the only way to insert file is copy the file 'manually' after the insert of field?
or can use a TLobLocator for copy the file?

How can get the real path of directory set with the statement CREATE DIRECTORY

it's possible a code example?

thank's in advance!
 
The easiest way to insert a BFile into a table is to use the standard BFileName function. For example, to insert a BFile column in a table you could use the following SQL statement:

insert into filetable (id, blobfile)
values ( :v_id, bfilename( :v_directory, :v_filename))

The directory must be created with the 'create directory' SQL statement, and the file must reside in this directory on the server.

To find out what physical directory a logical Oracle directory is pointing to, you can query the all_directories view.

------------------
Marco Kalter
Allround Automations

[This message has been edited by mkalter (edited 18 May 2000).]

[This message has been edited by mkalter (edited 18 May 2000).]
 
Back
Top