This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
getColumns() method on Databasemetadata returns empty for table synonyms
Joined: Oct 21, 2002
Oct 06, 2004 17:03:00
How can i get Information about table columns from TableSynonym.
getColumns name in DatabaseMetadata returns empty result set for tableSynonyms.
because of security restrictions and for easy database maintainence i should not use table names itself.
I am using following method to check number of columns in Table synonym.
passing tableSynonym for tableName
catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)
Retrieves a description of table columns available in the specified catalog.
Do you guys suggest any work around to get Columns associated with real table from its synonym.
Sun Certified Java Programmer
Joined: Sep 23, 2004
Oct 07, 2004 16:23:00
What database backend and driver are you using? I've not seen this problem with views but it may be a driver issue.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Joined: Oct 21, 2002
Oct 07, 2004 17:21:00
i am using Oracle thin driver.
Infact i am able to retrieve columns for table synonym,i set the property setINcludeSynonyms(true) on
oracle.jdbc.driver.OracleConnection from ther eit works fine.
Now when i am trying to get Primary keys through table synonym.I am getting
empty result set for it.Please let me know if you have any solution for it.
subject: getColumns() method on Databasemetadata returns empty for table synonyms
how to display primary keys from metadata
MSSQL throwing "java.lang.ArrayIndexOutOfBoundsException: 20" for getColumn()
Making ResultSet object scrollable
pulling the table names from a Database
Oracle describe table from jdbc
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014