aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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");
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rsmdObj.getColumnName(i)) is blank.