Hey guys i'm trying to connect to my database and run a query. it all works apart from the query execution (after narrowing it down i found it to be this) Below i my code:
Statement statement = null;
ResultSet result;
result = statement.executeQuery(query);//this is where error is being caused
while(result.next())
{
Print("ID: " + result.getString("id"));
Print("USER: " + result.getString("username"));
Print("PASS: " + result.getString("password"));
}
I get this returned:
database!java.lang.NullPointerException
Thanks for any help you give me