Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 17 Feb 2003 @ 23:34:18 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Java connect problem
 
From:   McCall, Glenn D

This may be a stupid question, but then again maybe not, what is your url?\

The correct url should be something like:

jdbc:odbc:odbc_dsn

Where odbc_dsn is the name (with suitably escaped special characters such as blanks) of the ODBC Data source.

This example also generates the "No suitable driver message" but not at the Class.forName statement.

The sun.jdbc.odbc.JdbcOdbcDriver is supplied as part of java so it probably won't be mentioned in any of the NCR manuals. The "Teradata Driver for the JDBC interface installation guide" describes how to structure URL's for the Teradata JDBC driver (com.ncr.teradata.TeraDriver).


Hope this helps

Glenn Mc


import java.sql.*;

public class test {

    public static void main (String args []) {

      try {
         Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
        // it doesn't seem to find the driver, but it does not blow up here
        Connection connection =
DriverManager.getConnection("blah:odbc:local", "fred", "pw");
// blows up here...
        }
     catch (SQLException e) {
            System.out.println ("SQL error: " + e.getMessage () + "\n" +
e.getSQLState ());
        }
        catch (Exception e) {
            System.out.println ("Other error: " + e.getMessage ());
        }
    }
}


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016