I am using Netbeans IDE and postgres as backend database.
I have a table naming bc_scan with columns (tokenno varchar, dtime timestamp, swapmode char(1)). I have entered timestamp in dtime field When i am trying to get data on pgadmin then it shows data but when i am placing the query on my ide then it shows null pointer exception. Although it shows getFetchSize() = 1.
String Sql = select dtime from bc_scan where tokenno = '01' and swapmode = '02'; Statement st = ??? so on....... ResultSet rs = st.executeQuery(sql); It Shows error on any of these.
Originally posted by Anand Karia: String Sql = select dtime from bc_scan where tokenno = '01' and swapmode = '02'; Statement st = ??? so on....... ResultSet rs = st.executeQuery(sql); It Shows error on any of these.
1.-3. cannot possibly throw a NPE, unless the JDBC driver has a bug (quite unlikely).
It would probably help if you showed us the true code and the stack trace.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
First i would like to inform you that rs.next() is already written. Finally when i change my jdbc driver from old one to new one then it show me correct result.
But this is really imazing that one form is getting result without any error from same old jdbc driver and another form is not. If i found any solution that why this problem has occur then i will definately post it here, if opssible.
Anyhow my this problem have been solved out through changing of jdbc driver.
Thank you all.
Love is GOD and GOD is Love.
M/s. Anand Karia Concreting IT