Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rsmdObj.getColumnName(i)) is blank.

Akshay Bhatia
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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


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));
System.out.println("Column name is blank");
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic