Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help on grab tab delim text data to database...

Status
Not open for further replies.

GoSooJJ

Programmer
Feb 24, 2001
76
US
Hi all,
I have a text file with tab delimeter data. Here is some example of my text file
======================
name address city state zip
JJ 123 st. LA CA 91801
Java 456 St. LA CA 93082
...
...
======================
Now, I want to grab this text data to database. I have Oracle 8 as database server.
Can anyone guide me how to read this text file? If I can get each column to string value, inserting to database will be easy...

I read several java books, but didn't help at all.
Please help!

JJ //
 
If you are already reading the data into a String, you can use StringTokenizer to break it up into individual Strings for each line.

You could also use StreamTokenizer to break it up into Strings during the read process.

I hope this at least gives you a starting point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top