Can one explain me in details how to store a text file in a table.For example I have a text file named as aa.txt.I want to store it in a table.Or i can also create a table in order to store it.How can i store it in that table.Please explain it in details.
10 10309
you need to user the datatype BFILE for your purpose.
you need to user the datatype BFILE for your purpose.
Thanks for your reply.I understand i have to use BFILE.But can u tell me the entire procedure in details.
try the following steps - create directory DIR1 as 'd:\data'
-
-
create table filetable(id number(6),filename bfile)
-
-
insert into filetable values (1,bfilename('DIR1','filename'));
the file to be stored must be in the specified directory / path
The BFILENAME function does not validate that the user has READ privileges on the specified file or directory alias. It also does not perform a physical check to see if the directory or file actually exist. Instead, these checks are performed when access against the BFILE object is attempted.
There are several issues to keep in mind with directory aliases:
An alias is a database object, an "internal" name for an external, filesystem-based directory location.
You must create a directory alias before you can use it.
To create a directory alias, you will need the CREATE DIRECTORY or CREATE ANY DIRECTORY system privileges.
To access a directory alias, you must be the owner or be granted the READ privilege on that alias.
Directory aliases can be case-sensitive!
try the following steps - create directory DIR1 as 'd:\data'
-
-
create table filetable(id number(6),filename bfile)
-
-
insert into filetable values (1,bfilename('DIR1','filename'));
the file to be stored must be in the specified directory / path
Thank you sir.But still I found one problem.It is stored in the database.But when I using 'select * from filetable;' Then It showing value error under filename column.Then how can i see the contents of the file which is stored inside the column filename.
Suppose if u dont have the prvileges then connect to DBA account or ask your DBA to do the same for you and grant the privilege:
SQL> GRANT CREATE DIRECTORY TO user_name;
SQL> CREATE DIRECTORY dd AS 'd:\data';
if u want to grant previleges on the directory then.
SQL> GRANT READ ON DIRECTORY projects TO new_user;
ALL_DIRECTORIES is the data dictionary view for directories.
In the call to BFILENAME, the case used to set that directory alias must match the case originally used to define the directory alias.
may i know please what is the tool u are using.
may i know plese what is the tool u are using.
I am using pl/sql developer.
Column or attribute of type BFILE can not be displayed by using plsql developer or by SQL* PLUS.
u need to retrive it programitically.
Column or attribute of type BFILE can not be displayed by using plsql developer or by SQL* PLUS.
u need to retrive it programitically.
Please tell me the procedure to retrieve it programitically.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Christopher Brandsdal |
last post by:
Hi!
I have a delicatg problem....
I have made a registration form for adding my friends information in a
database. The problem is that I want to...
|
by: Roy Gourgi |
last post by:
Hi,
I am used to working in Visual FoxPro and I would like to be able to create
a database and store and retrieve information from it. What is...
|
by: Mark |
last post by:
I'm trying to port the asp.net unleashed sample store from SQLServer to
Access. I have it all do, execpt when I try and add something to the cart I...
|
by: Rudy |
last post by:
Hello all!
I am amazed how many posts I have read to store an image in SQL, and just as
many against it. So I learned how to store an image in a...
|
by: rdemyan via AccessMonster.com |
last post by:
I'm trying to implement a licensing scheme. There are three types of
licenses:
Trial - good for 30 to 60 days
Interim - good for 1 year
Fully...
|
by: tlyczko |
last post by:
I am new to SS2005, and I've just started working on a small test/dev
database.
I recently read that one should store things like tables, views,...
|
by: c676228 |
last post by:
Hi everyone,
I am just wodering in asp program, if there is anybody writing store
procedure for inserting data into database since there are so...
|
by: prabunewindia |
last post by:
Hello everybody,
here i am going to explain, how to get mails from Outlook express database and store in our own database(local)
Initially you...
|
by: harshad |
last post by:
Dear All,Here I am facing problem to store image.I am trying to store byte
array(image) in to session variable so at time of update I will got that...
|
by: M.-A. Lemburg |
last post by:
On 2008-08-07 20:41, Laszlo Nagy wrote:
1
It also very fast at dumping/loading lists, tuples, dictionaries,
floats, etc.
--
Marc-Andre...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
| |