943,728 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 1502
  • Java RSS
Nov 20th, 2008
0

Text File to Java to Oracle

Expand Post »
I currently have a table in oracle which I have created, but need to take a text file (which I have used a fileChooser for) and then use this file to update the records in the oracle database. How would I go about this?

Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ebiz is offline Offline
16 posts
since Nov 2008
Nov 20th, 2008
0

Re: Text File to Java to Oracle

Read the file for its data.
Then use that data to query the database: Run an UPDATE to record you want to update.

Learn how to read files.
Learn SQL.
Learn how to run queries with java.
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,258 posts
since Dec 2007
Nov 20th, 2008
0

Re: Text File to Java to Oracle

Click to Expand / Collapse  Quote originally posted by ebiz ...
I currently have a table in oracle which I have created, but need to take a text file (which I have used a fileChooser for) and then use this file to update the records in the oracle database. How would I go about this?

Thanks.
You need a update statement to update your table in oracle. See below for "Update" syntax:
UPDATE table
SET column = expression
WHERE predicates;

Also you google to find "update", you will find a lot of examples. :-) .
Reputation Points: 9
Solved Threads: 2
Light Poster
AlbertPi is offline Offline
33 posts
since Nov 2008
Nov 20th, 2008
0

Re: Text File to Java to Oracle

thanks. i heard something about arrays, so i need to set the data from the text file as arrays, if so, how?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ebiz is offline Offline
16 posts
since Nov 2008
Nov 20th, 2008
0

Re: Text File to Java to Oracle

Whether you use arrays, Lists, or whatever, the point is still the same. You'll need to read the file content into some structure and then use JDBC to update/insert your table values.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Weather forcast class
Next Thread in Java Forum Timeline: NetBeans protected code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC