How to find currentSchema from JDBC application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Geraghty
    New Member
    • Dec 2006
    • 1

    How to find currentSchema from JDBC application

    I want to use DatabaseMetadat a to retrieve details of those stored procedures which belong to the current schema. How can I find out what is the current schema for an existing Connection?

    Or alternatively is there any special syntax in the getProcedures method to limit the results to procedures belonging to the current schema?

    Is there any clear documentation about the interpretation to be given to catalog and schema in DB2's JDBC implementation?

    Thanks.

    Pete
  • skchonghk
    New Member
    • Jan 2007
    • 6

    #2
    Execute "values current schema" SQL statement with the connection. The resultset will have the current schema.

    Comment

    Working...