I ran the following program with sqljdbc4.jar in the classpath. There is data in the EMPLOYEE table for the employee name DEMO but the following program is not retrieving data for DEMO. When the same program was run with Merlia.jar in the classpath, it was retrieving data for DEMO.
Did anyone faced these types of issues with sqljdbc4.jar?Are there any flaws in thesqljdbc4.jar?
Can someone help me out from this issue.
The JDBC specs don't say what the result of toString() on a ResultSet should be, so drivers are free to implement that method in any way at all. So it shouldn't be surprising to find that different drivers have different implementations of it.
If you want to discuss "flaws", I would say that using a ResultSet in that way is a bad idea. Stick to the way you saw in the tutorials.
Charan Teja Sri Rama
Joined: Dec 23, 2011
I have used the rs.getString(1) in the system.out.print statement but even then there is no output observed on the console. The problem may be with the setString() method.
Can you send me the program where ResultSet is not used.
subject: Binding in Prepared Statement is not working with Microsoft SQL Server JDBC Driver sqljdbc4.jar