I wrote a java program that should fill a sqlite database with some rows generated by an algorithm.
So I access the db and I insert my rows...
It goes for some seconds but:
1.30168691E9s 100 --> '0 1 2 5 8', 0, 0, 0
3.163s 200 --> '0 1 2 7 17', 0, 0, 0
3.158s 300 --> '0 1 2 9 30', 0, 0, 0
Exception in thread "main" java.sql.SQLException: unable to open database file
at org.sqlite.DB.execute(DB.java:275)
at org.sqlite.DB.executeUpdate(DB.java:281)
at org.sqlite.Stmt.executeUpdate(Stmt.java:103)
at grid0.GridFill.fillTable(GridFill.java:26)
at grid0.GridFill.writeCombs(GridFill.java:54)
at grid0.Main.main(Main.java:15)
Java Result: 1
the program goes for the first 300 rows, but then crashes... and I can't understand why. I need some help...
Thank you...
public void fillTable( String hand) throws Exception
{
String data = "'" + hand + "', 0, 0, 0";
if(count%100 == 0)
{
System.out.println((System.currentTimeMillis()-time)/(float)1000 + "s " + count +" --> " + data);
time = System.currentTimeMillis();
}
stat.executeUpdate("insert into Hands (Hand, Lock, Done, SubstitutionNumber) VALUES (" + data + ")");
}