Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Databases
»
JDBC and Relational Databases
to read a file and store it
Anuteja Mallampati
,
Greenhorn
Jan 27, 2011 01:31:41
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
public class AccountDetails { public static void main(String[] args) throws SQLException, IOException { ExtractData ed = new ExtractData(); File file = new File("/home/tsuser/new_bank_records.txt"); FileReader fr = new FileReader(file); BufferedReader br = new BufferedReader(fr); String line = br.readLine(); String[] data = {}; data = br.readLine().split(";"); while (data.length != 0) { ed.insertData(data); data = br.readLine().split(";"); } } }
I need a program to read data from a file and store data in a database..
--Thanks in advance
Paul Sturrock
,
Bartender
staff
Jan 27, 2011 02:57:03
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Please don't change what you have posted after someone has responded. It makes the conversation very confusion and reduces the chance people can help.
can any one post it as soon as possible
Please be aware that this site is
NotACodeMill
. Show us what you have so far and we can help.
Jeanne Boyarsky
,
author & internet detective
staff
Jan 27, 2011 18:17:09
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Anuteja,
Welcome to CodeRanch!
Take a look at the CLOB section of the
JDBC tutorial
.
Post by:
autobot
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
This thread has been viewed 1741 times.
Similar Threads
Incompatible type issue
Reading a text file using FileReader & BufferedReader : Unexpected output !
To find a largest sector in a given input string of 1's and 0's
readLine() and read() functionality
problem in IO reader
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:57:15
.