Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: CallableStatement Problem with Oracle database

Re: CallableStatement Problem with Oracle database

From: Max Jury Krainoff <black_at_ssu.samara.ru>
Date: Fri, 10 Mar 2000 16:54:58 +0400
Message-ID: <38c8f0fd@news1.rosprint.net>


Hello!
> try
> {
> System.out.println("Getting a connection.");
> Connection objConn =
> DbaseManager.getManager().getConnection();

Why don't you use DriverManager? And where do you specify login and password?

Exp:

  public static void OracleConnect(){
    // 1.

      try{
        DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
      } catch (SQLException sqle){
        System.out.println("ERROR: Bad Oracle JDBC driver!");
      } // try

    // 2.
      try{
        conn = DriverManager.getConnection("jdbc:oracle:thin:" +
"@"+"your_site:1521:your_SID",
          "your_login", "your_password");
      } catch(SQLException sqle){
        System.out.println("ERROR: Bad password specified!");
      } // try

  } // OracleConnect

After all these actions CallableStatement works fine...

--
Sincerely yours,

Krainov, Max Jury                (846-2) 349760,    (846-2) 702302
Program Analyst                              Oracle & Java Programmer
AlphaNet International, Inc. www.alphafx.ru, www.iproject.ru Received on Fri Mar 10 2000 - 06:54:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US