View Single Post
  #1 (permalink)  
Old 04-26-04, 09:56 AM
Nerddette Nerddette is offline
Newbie Coder
 
Join Date: Apr 2004
Location: Australia
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
ResultSetMetaData Methods

I have been given the following snippet of code, which is part of a ResultSetModel.java file which is used by a file which uses JDBC/SQL data.

Code:
public String getColumnName (int columnIndex) {
        ResultSetMetaData  resultSetMetaData = resultSet.getMetaData();
        //Put some program code here. (They put this in, not me :))
    }
It then tells me to "use one of its methods, so that the above function returns an appropriate heading for each column. "

The GUI columns currently show as the defaults (a-e) and instead I want them to show ComNum, FirstName, Surname, Gender, CountryCode.

Any ideas???

Nerddette

Last edited by Nerddette; 04-26-04 at 10:05 AM.
Reply With Quote