This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "DatabaseMetaData and Finding Triggers" Watch "DatabaseMetaData and Finding Triggers" New topic

DatabaseMetaData and Finding Triggers

Yoo-Jin Lee
Ranch Hand

Joined: Nov 01, 2000
Posts: 119
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.
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 567
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
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.
I agree. Here's the link:
subject: DatabaseMetaData and Finding Triggers
It's not a secret anymore!