File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Fetching Current Schema value Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Fetching Current Schema value" Watch "Fetching Current Schema value" New topic
Author

Fetching Current Schema value

Kishore Kumar
Ranch Hand

Joined: Oct 15, 2007
Posts: 71
I am using WAS 6 with db2.

I've used currentSchema i.e deafault schema property in Datasource for JDBC connectiion pooling. Is there any way to fetch this value from java. I need to send this value to VB from java.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5533

If you do a query, you can get the schema name from java.sql.ResultSetMetaData.getSchemaName(). If your query did not contain an explicit schema name, this should be the default schema name.


JBoss In Action
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Fetching Current Schema value
 
Similar Threads
Castor mapping problem
Data Trafer one DB to anothert
The matching wildcard is strict, but no declaration can be found for element 'context:annotation'
Getting all the Tables from schema
need of schema export feature?