If I understand your question correctly I think you want to use the getColumnName() method on ResultSetMetaData (see
http://java.sun.com/j2se/1.4.2/docs/...tMetaData.html for more information)
Your comment line below would be replaced by:
return( resultSetMetaData.getColumnName( columnIndex ) );
Quote:
|
Originally Posted by Nerddette
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.
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
|