Does anyone j=know how to get a table name from a query? like Select * from Employ... i want to get the table name. Kindly help Thanks sathish
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
You need a reference to the database metadata, and then just use that to get information about the database. Check the API for metadata. Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
sathish
Ranch Hand
Joined: Apr 25, 2000
Posts: 33
posted
0
hi bosun i checked the API, but i just want to know the table name before the execution of query, but still, when i run through the query, i can't get the table name through the resultsetmetadata. Does the method getTableName() get me the table name?? but i got null. Thanks sathish
Thomas Paul
mister krabs
Ranch Hand
Joined: May 05, 2000
Posts: 13974
posted
0
"santish" The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention whci hyou agreed to when you registered, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please create a new log in with a new name which meets the requirements. Thanks.