1: C: /jdk/lib/tools.jar; c: /jdk/lib/dt.jar; c: /jdk/jre/lib/dt.jar; c: / javao; c: / program Files / Microsoft SQL Server 2000 Driver For JDBC / LIB / MSBASE.jar; C: / Program Files / Microsoft SQL Server 2000 Driver For JDBC / LIB / MSUTIL.JAR; C: / Program Files / Microsoft SQL Server 2000 Driver For JDBC / LIB / MSSQLServer.jar
2: Copy msbase.jar, mssqlserver.jar, msutil.jar to the working directory
3: Document joins:
Class.forName ( "com.microsoft.jdbc.sqlserver.SQLServerDriver"); System.out.println ( "JDBC driver loaded"); con = DriverManager.getConnection ( "jdbc: microsoft: sqlserver: //192.168.4.50: 1433 DatabaseName = GAO "," SA "," ");