Quote Originally Posted by Alexz003 View Post
Hello, i'm working with SQL's and in this bit of code i'm basically trying to fetch the data located in the 'date' column in my table.
Code:
                Statement pStmt = null;
		pStmt.executeUpdate("SELECT date FROM " + ticker);
However the error i am getting is this:

Code:
Exception in thread "main" java.lang.NullPointerException
	at Main.Database.getDateData(Database.java:193)
	at Main.Main.main(Main.java:23)
The line the nullPointer is coming up at is in red.
You set the Statement pStmt to null. And after that you are trying to execute
Code:
pStmt.executeUpdate(...);
with the NULL-pointer!
So why do you wonder getting the error message?