wood burning stoves 2.0*
The moose likes JDBC and the fly likes rsmdObj.getColumnName(i)) is blank. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "rsmdObj.getColumnName(i)) is blank." Watch "rsmdObj.getColumnName(i)) is blank." New topic
Author

rsmdObj.getColumnName(i)) is blank.

Akshay Bhatia
Greenhorn

Joined: Sep 24, 2004
Posts: 26
Hi,

Following code is giving rsmdObj.getColumnName(i)) as blank.I have verified it using if clause.any inputs will be a great help.

Akshay.


ResultSetMetaData rsmdObj=rs.getMetaData();
System.out.println("rsmd column count:"+rsmdObj.getColumnCount());
for (int i=1;i<=rsmdObj.getColumnCount();i++){
System.out.println(" Column Name:"+rsmdObj.getColumnName(i));
System.out.println(" ColumnType Name:"+rsmdObj.getColumnTypeName(i));
if(rsmdObj.getColumnName(i).equals("")){
System.out.println("Column name is blank");
}
}
 
Consider Paul's rocket mass heater.
 
subject: rsmdObj.getColumnName(i)) is blank.
 
Similar Threads
MetaData question
retrieving data from a databse into an excelsheet
One To Many Unidirectional(Hibernate)
.csv
JTable Troubles.