Results 1 to 2 of 2

Thread: example connect with Oracle or SqlServer

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Question example connect with Oracle or SqlServer

    Hi

    Somebody has a example connection with Oracle or SqlServer ?


    Where can I download Drivers to SqlServer and Oracle ?


    thank you in advance

  2. #2
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    This isn't quite what you're looking for (it's mysql), but it might help you get to where you're going.

    cudabean

    Code:
    import java.sql.*;
    
    try {
          Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/" + DBName + 
            "?user=" + DBUser + "&password=" + DBPassword);
        }
        catch (SQLException e) {
          System.out.println("SQLException: " + e.getMessage());
          System.out.println("SQLState:     " + e.getSQLState());
          System.out.println("VendorError:  " + e.getErrorCode());
        }

Posting Permissions

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



Click Here to Expand Forum to Full Width