> Then I have a class called MyDBConn.java, inside this class there's a
> method called GetResultFromPazienti():
The method below is called GetResultFromPazienti2().
> MyDBConn.java:
> ==================================
[quoted text clipped - 8 lines]
>
> // ...
the method below is not the same as you specify above.
You never instantiate stmt so maybe that is what is producing the null
pointer.
> public ResultSet getResultFromPazienti2(String query) {
> ResultSet rs=null;
[quoted text clipped - 23 lines]
> private MyDBConn mdbc;
> private java.sql.Statement stmt;
Is stmt ever used and initialized?
Is mdbc ever initialized? You leave out code that prevents full analysis
so we can't help you.
> // ...
> // ...
[quoted text clipped - 23 lines]
> problems???
> Thank you to all....
The exception should tell you what line the null pointer is on. Does it?