File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Passing application info to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Passing application info to database" Watch "Passing application info to database" New topic

Passing application info to database


Joined: Feb 12, 2005
Posts: 1
In most of the application we've some auditing information like created by, creation date, etc to be stored in database along with transaction information. This can be done via triggers or explicitly passing this information in SQL constructs through JDBC calls.
I recently read about getClientInfo and setClientInfo methods available on connection object in JDBC 4.0 specification. Can we use this information to store user details and get these in database. Am not sure if this is possible. If not, is there any other way apart from triggers and explicitly passing setting these in SQL queries. Don't know if some drivers provide some implementations for this.

I agree. Here's the link:
subject: Passing application info to database
It's not a secret anymore!