473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

read files and upload in database

6
Hi

Can anyone provide an example of how to read files in java and upload this information to the database ?

Thanks
Feb 21 '07 #1
14 3567
sicarie
4,677 Expert Mod 4TB
Hi

Can anyone provide an example of how to read files in java and upload this information to the database ?

Thanks
Here is a link on Java File IO.

As for the database question, you're going to have to download your driver, either put it in your classpath or attach it to your program, create a connection, and upload. How you do this is dependent on what type of database you are connecting to.
Feb 21 '07 #2
r035198x
13,262 8TB
Hi

Can anyone provide an example of how to read files in java and upload this information to the database ?

Thanks
What type of files? .txt, .pdf, .doc, .xml?
Feb 21 '07 #3
IVETH
6
thaks for your help, but I need to read files in java and upload this information to the database with a Web Applications
Mar 1 '07 #4
r035198x
13,262 8TB
thaks for your help, but I need to read files in java and upload this information to the database with a Web Applications
Are you going to tell us what tpye of files they are?
Mar 1 '07 #5
IVETH
6
Are you going to tell us what tpye of files they are?
thaks for your help, I need to read files.txt in java and upload this information to the database using Java Beans
Mar 6 '07 #6
r035198x
13,262 8TB
thaks for your help, I need to read files.txt in java and upload this information to the database using Java Beans
Are you able to connect to the database then. If they are .txt files then reading is not going to be a problem. You can use Scanner or FileReader. What you need to do is make sure you've got your database connection right. What is the structure of the data in the text files and how do you want it to be structured in the database.
Mar 7 '07 #7
IVETH
6
Please, can you give a code example?
Thanks
Mar 9 '07 #8
sicarie
4,677 Expert Mod 4TB
Please, can you give a code example?
Thanks
Not really, there aren't enough details. What database are you using? How do you want to connect - with what driver?

So you understand the FileReader/Scanner portion?
Mar 9 '07 #9
r035198x
13,262 8TB
Please, can you give a code example?
Thanks
For which part? Have you written anything yourself yet? Write the file reading part first.
Mar 10 '07 #10
IVETH
6
Not really, there aren't enough details. What database are you using? How do you want to connect - with what driver?

So you understand the FileReader/Scanner portion?
I am using Oracle 9i, i want to do a java bean that read the file and save the information in the database.
Thanks
Mar 12 '07 #11
r035198x
13,262 8TB
I am using Oracle 9i, i want to do a java bean that read the file and save the information in the database.
Thanks
Well start on it. When you get stuck with the code post and then we'll be able to help.
Mar 12 '07 #12
IVETH
6
Well start on it. When you get stuck with the code post and then we'll be able to help.
I have the code to connect to a database, i need only the instructions for read the text file then i have to upload that contents into a table.
Mar 30 '07 #13
sicarie
4,677 Expert Mod 4TB
I have the code to connect to a database, i need only the instructions for read the text file then i have to upload that contents into a table.
http://www.google.com/search?hl=en&q...=Google+Search http://www.google.com/search?hl=en&q...=Google+Search

The first links (the javadocs) will probably be the most helpful to you.
Mar 30 '07 #14
r035198x
13,262 8TB
I have the code to connect to a database, i need only the instructions for read the text file then i have to upload that contents into a table.
The tip of the week talks about how to read files.
Mar 31 '07 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Eric Kincl | last post by:
Hello, its been a while since I posted/looked here... my normal email client doesn't handle newsgroups :( (ximian evolution) I was wondering how you stick a file into a database, and then...
5
by: Stephane | last post by:
Hello, I need to allow an end user to upload video files on a server and in the same time to put the file name and a few infos in a database. It must be very simple for the end user, and...
3
by: Doug | last post by:
Working on converting an Access front-end/SQL Server back-end to a .NET front/SQL Server back-end. We are also redesiging the SQL Server database. We have many Word/Excel documents that have...
6
by: ajaykataram | last post by:
Hi all i am getting error in the following code to upload files csv and txt files i have to insert the following values only into database if firstname,lastname and email id is null it should not...
2
by: shapper | last post by:
Hello, I am creating a simple CMS for a web site. The web site will hold many documents and for that I created Documents table which holds information on each document such as: Title,...
0
by: dann2 | last post by:
hello, i try to upload in an access db two pictures at the same time. i use the adjusted sample code from persits. it looks like this: ... '<% ' Create an instance of AspUpload object 'Set...
43
by: bonneylake | last post by:
Hey Everyone, Well this is my first time asking a question on here so please forgive me if i post my question in the wrong section. What i am trying to do is upload multiple files like gmail...
0
by: ll | last post by:
I'm working with 'pure ASP upload' script which is designed to redirect to an alert/error message, should a file larger than the set limit be attempted to be uploaded. The problem is that, while...
4
by: MoroccoIT | last post by:
Greetings - I saw somewhat similar code (pls see link below) that does mupltiple files upload. It works fine, but I wanted to populate the database with the same files that are uploaded to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.