View Single Post
  #2 (permalink)  
Old 08-06-2007, 11:24 PM
leonard leonard is offline
Member
 
Join Date: Jul 2007
Posts: 43
leonard is on a distinguished road
I have found out what the error is.
When we use a ResultSet object to get the date please note:
if we use: ResultSetobject.getString("Name of column") we should place these statements in order of the column designed in our database. For example:
You have 5 columns namely: Field1, Field2, Field3, Field4, Field5.
If you get them by NAME you should get them in order: The following code will give error:
Code:
rs.getString("Field2"); rs.getString("Field1");

It should be like this:

Code:
rs.getString("Field1"); rs.getString("Field2");
Reply With Quote