Get your CodeRanch badge!*
The moose likes JDBC and the fly likes DatabaseMetaData and Finding Triggers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DatabaseMetaData and Finding Triggers" Watch "DatabaseMetaData and Finding Triggers" New topic
Author

DatabaseMetaData and Finding Triggers

Yoo-Jin Lee
Ranch Hand

Joined: Nov 01, 2000
Posts: 119
Hi,
If I use the DatabaseMetaData interface is there a method or an easy way to get triggers and stored procedures? Right now I have to create a vendor-specific SQL statement.
Thanks for your help.
-Yoo-Jin.
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 565
from the docs:


after a quick look i couldn't see anything about triggers, but i'd be interested to know if you find it. otherwise if you're using oracle or sql server & perhaps other dbs that i don't know, you can query the db dictionary like a normal table - you just have to know the codes & the column names


I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Yoo-Jin Lee
Ranch Hand

Joined: Nov 01, 2000
Posts: 119
Hi,
Looks like there isn't a method to find triggers I even asked the company where we purchased our jdbc drivers. Perhaps this could be something that could be added to the DatabaseMetaData interface - it's fairly easy enough to do.
cheerios,
Yoo-Jin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DatabaseMetaData and Finding Triggers
 
Similar Threads
PL / SQL problem
Need to get table meta data
DatabaseMetaData
Can we update multiple tables in a single update query?
Checking for Session Timeout