Insert to database from text file

How can i insert into an access database using sql which gets the values from a text file?
Who is Participating?
CEHJConnect With a Mentor Commented:
Read as tokens, insert as fields

int fieldNum = 0;
StringTokenizer st = new StringTokenizer(fileLine);
while ( st.hasMOreTokens()) {
  ps.setString(++fieldNum, st.nextToken());
Tommy BraasCommented:
ps in CEHJ's example is a PreparedStatement.
johnbert_99Author Commented:
can u maybe explain more?....
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Please give the format of the text file
Tommy BraasCommented:
A PreparedStatement is an easy  way to add content to a query statement or update/insert statement.

You can find the Javadocs here:
Mayank SAssociate Director - Product EngineeringCommented:
Reading from a text-file:

(you can also have a look at the "Related Examples" and at:

Inserting a row into a database-table:
Mayank SAssociate Director - Product EngineeringCommented:
Since points are too less to split, accept CEHJ's comment as answer.
All Courses

From novice to tech pro — start learning today.