I'm trying to delete an entry from a SQLite database with java, the code I'm using is this:
public static void main( String args[] )
{
Connection c = null;
Statement stmt = null;
try {
Class.forName("org.sqlite.JDBC");
c = DriverManager.getConnection("jdbc:sqlite:students.db");
c.setAutoCommit(false);
stmt = c.createStatement();
String sql = "DELETE FROM Grade12 WHERE Name = james";
stmt.executeUpdate(sql);
c.commit();
stmt.close();
c.close();
} catch ( Exception e ) {
System.err.println( e.getClass().getName() + ": " + e.getMessage() );
System.exit(0);
}
}
But I keep getting the error java.sql.SQLException: no such column: james
Anyone know how to fix this?