Author: bluesky35 (blue) 1 using JDBC access OracleString url_ = "172.0.0.1:1521:bluesky";String id_ =" bluesky35 "; String pass_ =" admin "; Class.forName (" oracle.jdbc.driver.OracleDriver "); Conn = drivermanager.getConnection (" JDBC: Oracle: Thin: @ " URL_, ID_, PASS_);
2. Using JDBC to access SQL ServerClass.forName ( "com.microsoft.jdbc.sqlserver.SQLServerDriver"); conn = DriverManager.getConnection ( "jdbc: microsoft: sqlserver: //172.0.0.1: 1433; User = bluesky35; Password = Admin; DatabaseName = Bluesky); The above is two ways to access Oracle and SQL Server 2000 using JDBC.