Announcement Announcement Module
Collapse
No announcement yet.
Ibatis modify java.sql.connection Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ibatis modify java.sql.connection

    I am using Ibatis for accessing data on a Sybase database server. My problem is that Sybase rather than having multiple tablespaces has multiple databases within the same datacenter.
    There isn't a way (that I know of) to modify SQL to query the database instance you need to connect to.
    Using a simple JDBC connection, I have to call the Connection.setCatalog(dbName") method before I get a statment and execute it in order to query a certain database. With Ibatis, using an SqlMapClient, I cannot figure out a way to get a reference to the java.sql.connection object it will use before I call, for example, sqlMapClient.queryForList(statement).

    Does anyone know how to set the catalog on the java.sql.connection that is buried somewhere in the sqlMapClient?

    Every time I try to call sqlMapClient.geCurrentConnection() -- it's always null!

  • #2
    How to check the modify and setting of connection?
    Radialabs

    Comment

    Working...
    X