ADSM-L

JDBC-ODBC Bridge and TSM ODBC driver

2002-05-10 06:19:01
Subject: JDBC-ODBC Bridge and TSM ODBC driver
From: "Warren, Matthew James" <matthewjames.warren AT EDS DOT COM>
Date: Fri, 10 May 2002 11:19:20 +0100
He TSM'ers,

Has anyone any success connecting to the TSM database using the JDBC-ODBC
bridge and the TSM ODBC drivers? I have set bot system and user datasources
using the TSM ODBC driver, and I am then attmepting to access this from Java
using the JDBC-ODBC bridge.

Currently I am using this code in a Main method;

try
{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException CNFE)
{
    System.out.println(CNFE.toString());
}
try
{
    Connection con =
DriverManager.getConnection("jdbc:odbc:SPADUX","{auserid}","{apassword}");
}
catch(SQLException SQLE)
{
    System.out.println(SQLE.toString());
}


I have tried with both a System DSN setup called SPADUX using the TSM ODBC
drivers, and a user DSN.


And I get the following error;

Session established with server SPADUX0001: Solaris 7/8
  Server Version 4, Release 2, Level 1.9
  Server date/time: 05/10/2002 11:12:44  Last access: 05/10/2002 11:05:26

java.sql.SQLException: General error
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6138)
        at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6266)
        at sun.jdbc.odbc.JdbcOdbc.SQLColAttributes(JdbcOdbc.java:2044)
        at
sun.jdbc.odbc.JdbcOdbcResultSet.getColAttribute(JdbcOdbcResultSet.java:5241)
        at
sun.jdbc.odbc.JdbcOdbcResultSet.getColumnType(JdbcOdbcResultSet.java:5870)
        at
sun.jdbc.odbc.JdbcOdbcResultSet.getMaxCharLen(JdbcOdbcResultSet.java:5269)
        at
sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:267)
        at
sun.jdbc.odbc.JdbcOdbcConnection.buildTypeInfo(JdbcOdbcConnection.java:1473)
        at
sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:379)
        at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:163)
        at java.sql.DriverManager.getConnection(DriverManager.java:515)
        at java.sql.DriverManager.getConnection(DriverManager.java:174)
        at TSMBillMan.main(TSMBillMan.java:32)


If I use the Forte4J CE Database connection class wizard, I get the extra
information along with the above;

'Unable to Connect: TSM: There is no information about this table'

When the wizard attempts to connect to the DB. I guess the wizard is
attempting to query something similar to the syscat tables to discover
details about the database??


Has anyone else come across this, or succesfully used the JDBC-ODBC Bridge
and the TSM ODBC driver?
<Prev in Thread] Current Thread [Next in Thread>