1. Select the host on which the 'attask' database resides.2. Select 'Properties'3. On the 'Server Properties' popup dialog, select the 'General' tab.4. On the 'General' tab, select the 'Network Configurations...' button.5. Make sure that the 'TCP/IP' protocol is in the 'Enabled Protocols' list.
Class.forName( "net.sourceforge.jtds.jdbc.Driver" );
cn = DriverManager.getConnection( "jdbc:jtds:sqlserver://MyDbComputerNameOrIP:1433/master", sUsr, sPwd );2) Microsoft SQLServer(http://www.microsoft.com)
Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );
cn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://MyDbComputerNameOrIP:1433;databaseName=master", sUsr, sPwd );
用这两个驱动写法试一下。看是否可以快一些
关注ing……