Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

rsmdObj.getColumnName(i)) is blank.  RSS feed

 
Akshay Bhatia
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
}
}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!