i am using an else if to call a method from another class but it says a ')' is expected can anyone help please :D
else if (source == tol.jbTakeOut)
{ bookname = tol.jtfBookName.getText();
authorf = tol.jtfAuthorFName.getText();
authors = tol.jtfAuthorSName.getText();
[I]Store.changeLoanStatus(String bookname, String authorf, String authors);[/I] //the line which the error appears on :\
Storage.closeConnection();
}
the class being called :D
public void changeLoanStatus(String bookname, String authorf, String authors)
{
if (takenOut = false) takenOut = true;
if (takenOut = true) takenOut = false;
String sql="UPDATE tblBook SET TakenOut = '" + takenOut + "' WHERE BookName = '" + bookname + "' AND Firstname = '" + authorf + "' AND Surname = '" + authors + "'";
System.out.println("Sql statement : " + sql);
try
{
int ok;
statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
ok=statement.executeUpdate(sql);
connection.commit();
System.out.println("LoanStatus Changed");
}
catch (Exception e)
{
System.out.println("Unable to take on Loan " + e.getMessage() );
}
}
thanks for the help in advance