hi everyone,
I'm trying to delete a row with a certain IDnumber names 'IDtoDelete'. My delete part seems not to work;
is something missing?(IDtoDelete is read from a textfield as a string);
public void DeleteFrom(String IDtoDelete) {
try {
deleteStmt = con.prepareStatement(
"DELETE FROM UserInfo WHERE UserID= 'IDtoDelete'" );
} catch (SQLException ex) {
ex.printStackTrace();
}
}
apart from this, how do i assign buttons that help to move around the database table and display the current row's elements.(for example move prev,move forw : going to previous row or next rown and displaying them)
thanks in advance;
cheers
I'm trying to delete a row with a certain IDnumber names 'IDtoDelete'. My delete part seems not to work;
is something missing?(IDtoDelete is read from a textfield as a string);
public void DeleteFrom(String IDtoDelete) {
try {
deleteStmt = con.prepareStatement(
"DELETE FROM UserInfo WHERE UserID= 'IDtoDelete'" );
} catch (SQLException ex) {
ex.printStackTrace();
}
}
apart from this, how do i assign buttons that help to move around the database table and display the current row's elements.(for example move prev,move forw : going to previous row or next rown and displaying them)
thanks in advance;
cheers