Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

How to fetch Table Name

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have a problme in JDBC.

I am not able to fetch table name from my ResultSetMetaData. When I call,

ResultSetMetaData rsmt = resultSet.getMetaData();
strTableName = rsmt.getTableName();

the strTableName does not assign with table name.

And I could read an article saying that the getTableName() method only returns meaningful information for OBDC compliant databases. For all other databases, this method returns an empty string.

So is there any other way to get the table name from the metadata???

Please help me if anyone has done it before..

Thanks in advance,

Ratheesh
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ResultSetMetaData.getTableName() return table name or "" if not applicable

>is there any other way to get the table name from the metadata???
No way, except for extracting table name from the original sql by yourself.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic