Hi Guys well what I want to do is instead of within my writeString to set my PLAYCOUNT to '16' what I want to do is every time the statement is executed my PLAYCOUNT is increased by 1.
Any help you can give would be appreciated:
My code is below:
if (e.getSource() == writeBtn) {
String f = VIDEOID.getText();
String v = VIDEONAME.getText();
String s = DIRECTOR.getText();
String r = RATING.getText();
String p = PLAYCOUNT.getText();
// if any field is blank, signal an error
String writeString =
"UPDATE VIDEOS SET PLAYCOUNT = '16' WHERE VIDEOID = '1'";
try {
myStatement.executeUpdate(writeString);
VIDEONAME.setText("");
DIRECTOR.setText("");
RATING.setText("");
PLAYCOUNT.setText("");
} catch (SQLException sqle) {
Toolkit.getDefaultToolkit().beep();
showMessageDialog(this, "Wrong Data Type");
}
VIDEOID.setText("");
}