Hi,
Problem here is I can retrieve all the table names from DB using con.getMetadata.getTables(). This returns all the tables in the DB irrespective of wether user(used in connection
string) has privileges or not. SO in next step when I am using one of the tables from the fetched result set, I get 'table or view does not exist'.
I tried to get privileges with con.getMetadata.getTablePrivileges(null,null,tablename). This narrows the tables further but still when I do a select in some of this table I face the same issue 'table or view does not exist'.
Am I doing something wrong in second step ?
Is there any other way of doing this in
JDBC?
I need to get only those table names for which the user can perform select operation?
any help would be good.
Thanks,
Aditya