jbsuser
jbsuser

Reputation: 3

Pattern matching in database

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

Answers (1)

Philip Sheard
Philip Sheard

Reputation: 5825

try adding brackets, thus:

  if(textFileStrings.equals(dbtext)) {
     pstmt.setInt(status,0);
     prepareStatement.updateQuery(); }

Upvotes: 1

Related Questions