Skip to Content

Cannot retrieve the HANA Catalog Name

Hi all,

I have a Java program that has to connect to a HANA database via JDBC to do some CRUD operations.

When I create the JDBC connection I try to retrieve the Catalog Name of the HANA db, but it is null.

These are the steps that I do:

java.sql.Connection conn = getConnection(); // get the connection from the Context

String catalogName = conn.getCatalog();

catalogName is null!

I am using Java 1.6 and the application runs on JBoss 7.

Please,

can anyone help me?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 23, 2013 at 09:11 PM

    Hi Gennaro,

    as SAP HANA currently does not support multiple databases, the return value of getCatalog() is correctly NULL.

    This is in full compliance with the specification of the method (http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#getCatalog() and http://jcp.org/en/jsr/detail?id=221).

    - Lars

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.