Trouble with Java + Oracle
Results 1 to 2 of 2

Thread: Trouble with Java + Oracle

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    228

    Trouble with Java + Oracle

    I can't get my program to connect to the Oracle Server at my school where I have my database located. I was given a user name and password, used scott & tiger for the example, also given the url, but it still doesn't work. Am I doing something wrong here?


    public class DataBean
    {
    private CachedRowSet rowSet;

    // construct TitlesBean object
    public void DataBean() throws Exception
    {
    //load the Oracle Driver
    Class.forName( "oracle.jdbc.driver.OracleDriver" );

    // specify properties of CachedRowSet
    rowSet = new CachedRowSetImpl();
    rowSet.setUrl( "jdbcracle:thin:@vali.******:1**1rcl" );
    rowSet.setUsername( "Scott" );
    rowSet.setPassword( "Tiger" );



    rowSet.setCommand("SELECT * FROM courses");
    rowSet.execute();
    } // end DataBean constructor

  2. #2
    Senior Member JPnyc's Avatar
    Join Date
    Jan 2005
    Posts
    2,734
    You're saying you can't connect when you're NOT at school? Either it's an intranet or their
    firewall is blocking, if that's the case.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides