Hi All, I ahve created database connection with SQLite using JDBC in java. My sql statements execute properly. But sometimes I get the following error while i use conn.commit() java.sql.SQLException: SQL logic error or missing database
Can anyone please help me how to avoid this type of problem. Can anyone give me better approach of calling JDBC programs
Class.forName("org.sqlite.JDBC");
conn = DriverManager.getConnection("jdbc:sqlite:/home/Data/database.db3");
conn.setAutoCommit(false);
String query = "Update Chits set BlockedForChit = 0 where ServerChitID = '" + serverChitId + "' AND ChitGatewayID = '" + chitGatewayId + "'";
Statement stmt = conn.createStatement();
try {
stmt.execute(query);
conn.commit();
stmt.close();
stmt = null;
}
Thanks Sunil Kumar Sahoo