File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "rsmdObj.getColumnName(i)) is blank." Watch "rsmdObj.getColumnName(i)) is blank." New topic

rsmdObj.getColumnName(i)) is blank.

Akshay Bhatia

Joined: Sep 24, 2004
Posts: 26

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");
I agree. Here's the link:
subject: rsmdObj.getColumnName(i)) is blank.
It's not a secret anymore!