You can't insert variables or arrays into a database. You can only insert data, ie the values of your variables or arrays.
A PreparedStatement is the way to go. It would look something like this;
int a = 1;
Date b = new Date();
String c = "hello world";
PreparedStatement stmt = conn.prepareStatement("INSERT INTO MyTable VALUES (?,?,?)");
stmt.setInt(1, a);
stmt.setDate(2, new java.sql.Date(b.getTime());
stmt.setString(3, c);
stmt.execute();
Note that it doesn't look like you have correctly designed your table to match your data. Your ReadingFile seems to have 5 Lists and you need to figure out how the values in these lists relate to each other. Your current logic with 5 nested loops is almost certainly not what you want. It results in a highly denormalised structure.
For example, say you had a ReadingFile object with an id of 1, date of 20/1/2011, distance of 10, time elapsed of 20 and start time of 30. Then each of the lists had two values;
- temperature 21, 23
- velocity 51, 52
- altitude 1000, 2000
- lat 45.1, 47.2
- long 52.3, 58.4
Then your nested loops would insert data into your table like this;
+--+---------+--------+-----------+---------+-----------+--------+--------+----+----+
|id| date|distance|timeElapsed|startTime|temperature|velocity|altitude| lat|long|
+--+---------+--------+-----------+---------+-----------+--------+--------+----+----+
| 1|20.1.2011| 10| 20| 30| 21| 51| 1000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 51| 1000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 51| 1000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 51| 1000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 52| 1000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 52| 1000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 52| 1000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 52| 1000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 51| 1000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 51| 1000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 51| 1000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 51| 1000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 52| 1000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 52| 1000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 52| 1000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 52| 1000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 51| 2000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 51| 2000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 51| 2000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 51| 2000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 52| 2000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 52| 2000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 21| 52| 2000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 21| 52| 2000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 51| 2000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 51| 2000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 51| 2000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 51| 2000|47.2|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 52| 2000|45.1|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 52| 2000|45.1|58.4|
| 1|20.1.2011| 10| 20| 30| 23| 52| 2000|47.2|52.3|
| 1|20.1.2011| 10| 20| 30| 23| 52| 2000|47.2|58.4|
+--+---------+--------+-----------+---------+-----------+--------+--------+----+----+