Home arrow static arrow Java Programming [Archive] - Question about ResultSet Columns
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Question about ResultSet Columns
This topic has 1 reply on 1 page.

Posts:370
Registered: 8/17/02
Question about ResultSet Columns  
Jun 23, 2004 6:22 PM



 
Do resultset columns start at index 0 or 1???
 

Posts:9,091
Registered: 8/15/01
Re: Question about ResultSet Columns  
Jun 23, 2004 6:32 PM (reply 1 of 1)



 
From the [url http://java.sun.com/j2se/1.5.0/docs/api/java/sql/ResultSet.html]API docs[/url]
The ResultSet interface provides getter methods (getBoolean, getLong, and so on) for retrieving column values from the current row. Values can be retrieved using either the index number of the column or the name of the column. In general, using the column index will be more efficient. Columns are numbered from 1. For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.
 
This topic has 1 reply on 1 page.