Okay, so this isn't strictly server-side, but I'll post anyway..I am experimenting with Java for the first time - in particular with JDBC. I have managed to connect to my database using the code posted
here And that works just fine.
Now I'm trying to create a class whose constructor will create a connection to the db, and then provide it with a query method to run a query and return a reault object.
I have a second programme which instantiates an object from this class def, passes a query string to it, receives the returned ResultSet and attempts to loop through it and print out the results.
My base class DBTalker is
posted here . The 'calling' class, DBTest.java is
shown here
Both classes compile without error, but I get the following exception at runtime:
Connected to brezhnev
Managed to create statement
Cound't get through the results:
java.lang.NullPointerException
Can anyone point out any obvious errors and/or bad practices please?
christo