Reputation: 3
I want to search every rows of specific column and if it matches with the string that is stored in an array or list the condition is update the status column in the db.
Note: My code is reading from text file and writing to the db but when on comparison it doesnt works
if(textFileStrings.equals(dbtext))
pstmt.setInt(status,0);
prepareStatement.updateQuery();
Upvotes: 0
Views: 173
Reputation: 5825
try adding brackets, thus:
if(textFileStrings.equals(dbtext)) {
pstmt.setInt(status,0);
prepareStatement.updateQuery(); }
Upvotes: 1