This is a discussion on jdbc:java problem within the MySQL forums, part of the Database Server Software category; --> String sqlstring ="select host,port,username ,password,LastCrawlState from HostTable where id ="+id; System.out.println(sqlstring); rs = stmt.executeQuery(sqlstring); The result is : select ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| String sqlstring ="select host,port,username ,password,LastCrawlState from HostTable where id ="+id; System.out.println(sqlstring); rs = stmt.executeQuery(sqlstring); The result is : select host,port,username,password,LastCrawlState from HostTable where id =1 Exception in thread "main" java.lang.NullPointerException at Host.<init>(Host.java:65) at TestTwo.main(TestTwo.java:9) but the same Query I executed in mysql Query Brower had the right answer ,why? select host,port,username,password,LastCrawlState from HostTable where id =1 |