Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hashtable column names

 
phani kon
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am populating the data into the excel format.

Here is the code

Enumeration en = ht.elements();

int colCnt = ht.size();
int hdrCnt;
for(hdrCnt =1; hdrCnt<=colCnt; hdrCnt++)
{
if(hdrCnt>1){
out.print("\t");
}
out.print(ht.get(hdrCnt));

}

I can get only col numbers in the hdrCnt.But I want to get the colnames from the databases. If I say out.print(ht.get(hdrcnt)), I am getting the null not the names.

Can any one please tell me, how can I get the colnames here

Thanks
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: you don't do anything with the "en" variable. You probably should.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic