FIX: ?? ???? ????? ??? ??? ????? ?????? ????? SQL Server 2000 JDBC ? ?????? ??????? SQL Server 2005 ?? JDBC ?? ????? ??? ?????? ??????? ?????? ?????? SQL Server 2005 ?? ?? ?????? ???????

?????? ????????? ?????? ?????????
???? ???????: 915834 - ??? ???????? ???? ????? ????? ??? ???????.
??? #: 2059 (PSSWebData)
????? ???? | ?? ????

?? ??? ??????

???????

???? ??? ????????? ??????. ????? ?????? ?? Microsoft SQL Server 2000 ????? ?? JDBC ?? ????? ??. ?? ????? "?????? Microsoft SQL Server 2005 JDBC ???????" ?? ??? ???????. ?? ??? ?????????? ??? ?????? ??????? ?????? ?????? SQL Server 2005 ???????? SQL Server 2005 JDBC ?????? ????? ????, ??? ????? ??????? ???????? ?????? ?? Microsoft SQL Server 2000 ????? JDBC. ??? ??? ???? ??? ?????? ??????? ????? ????? ????? ???????:
[Microsoft][SQLServer ????? 2000 ?? JDBC][SQLServer]???? ???????? ????? ??????? ??????? ??????? ?????? (TDS) ??? ?????????? (RPC) ??? ????. ??????? 1 (""): ??? ?????? 0x38 ??? ?????.
??? ?? ????? ????? ????? ?????? ?????? SQL Server 2000 ?? ?? ???? ??? ????? ????? ??? ??????? ??? ??????? ?????? ??????? ?????? unnoticed. ????? ??? ??????? ??? ????? ?????? ??????? 2000 ???? SQL JDBC ??? ????? "?????? Microsoft SQL Server 2005 JDBC ???????" ?? ???????.

?????

???? ??? ??????? ???? ???? ????? ????? ??? ?? ?????? ????? SQL Server 2000 JDBC. ?????? ????? SQL Server 2000 JDBC ???? URLs ????? ?? ????? JDBC ????? ?? SQL Server 2005. ?????? SQL Server 2005 JDBC ??????? URLs ????? ????? ???? ??????? ???????:
jdbc:sqlserver: / / ConnectionString
??? ????? 2000 ???? SQL ?? JDBC ???? ????? ????? URLs ???? ???? ???????? ??????? ???:
jdbc:microsoft:sqlserver: / / ConnectionString
??? ???? ????? ????? 2000 ???? SQL ?? JDBC ???? ????????? ???? ??? ??????? ??????:
jdbc:sqlserver: / / ConnectionString
???? ????????? ???? ?? ??? ????? ????? 2000 ???? SQL ?? JDBC ??????? ?????? ?????? SQL Server 2005.

????

????? ???? ????? ???? ????? ?? Microsoft ???? ????? ??? ?? ?? ??????? ??????? ?? ??? ??????? ???. ??? ?????? ??? ??????? ???? ????? ??? ??????? ????????. ?? ??? ????? ???????? ?????? ??? ??? ??????? ??????. ?????? ??? ?? ??? ????? ??? ??????? ??????? ???? ????????? ??? ??????? ?????? ?????? SQL Server 2000 ??????? ????? ?????? JDBC ???? ????? ??? ??? ??????? ??????.

??? ??? ??????? ?????? ???? ?????? ??? ???????? ?? Microsoft "?????? ??? ??????? ??????. ?????? ??? ????? ????? ?????? ?????? ?????? ?????? ??? ???? Microsoft ???? ??????? ??? ?????? ?????? ?? ?????? ???? Microsoft ?????? ??? ?????:
http://support.microsoft.com/contactus/?ws=support
?????? ?? ??? ???????? ?? ??? ????? ????????? ???? ?????? ????? ??? ??????? ????? ??? ??? ?????? ????? ??? Microsoft ?? ??????? ?????? ??? ???? ??? ?? ???????. ???? ????? ?????? ????? ???????? ??? ????? ????? ???????? ????????? ???? ?? ???? ??? ???? ??? ???????.

??????? ?????

????? ????? ????? ?????????? ?? ??? ??????? ?????? ???? ????? (?? ???? ????) ??????? ?? ?????? ??????. ??? ??? ???????? ???????? ?????? ???? ??????? ?? "??? ??????? ???????" (UTC). ????? ???? ???? ??????? ?????? ??? ??????? ??? ??????? ??????. ?????? ????? ??? ??????? ??????? (UTC) ???????? ??????? ?????? ????? ??????? ??????? ??????? ?? ???? ??????? ?????? ?? "???? ??????".
?? ??? ??????????? ??? ??????
??? ???????? ???????????????
Msbase.jar289,713?? ?????? ????23: 02
Mssqlserver.jar67,483?? ?????? ????23: 02
Msutil.jar56,537?? ?????? ????23: 02

???? ??????

??????? ?????? ??? ??? ??????? ???? ??????? ???????:
  1. ????? ?????? ????? SQL Server 2005 JDBC ??? ????? ?????? ????? SQL Server 2000 JDBC. ?????? ????? ?????? ??? DriverManager ??? ?? ??????? ????????? ???????? ??????.
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); // 2000 version
    
  2. ??????? "?????? SQL Server 2005 ?????" ???? ?? URL ????? JDBC ????? ?????. ?????? ????? ?????? ??? ???? ?????? ????????? ???????? ???????. ????
    Connection con = DriverManager.getConnection("jdbc:sqlserver://<ServerName>;user=<UserName>;password=<Password>");
?????? ??? ???? ?? ????????? ??? ????? ??????? ?? ????? ???????? ?????? ??????? ???? ???? ??????? ????? ?????? ????? ???? ????? Microsoft (MSDN) ?????? ??? ?????:
????? URL ?????
http://msdn2.microsoft.com/en-us/library/ms378428.aspx

????? ????? ???????
http://msdn2.microsoft.com/en-us/library/ms378988.aspx

?????

???? Microsoft ?? ??? ??? ?? ?????? Microsoft ??????? ?? ??? "????? ???".

??????? ????

????? ????? ????? ???????

????? ??? ?? ????? Java ?????? ????????? ???????? "?????". java.sql.* ?????????
import java.sql.*;
public class TestDriver {
  public static void main(String[] args) throws Exception
       	{

       	Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
       	Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

	Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://<Server>;DatabaseName=<DatabaseName>", 
"<UserId>","<Passwd>");
	DatabaseMetaData dbmd = conn.getMetaData();
	System.out.println("Driver = " + dbmd.getDriverName() + "_" + dbmd.getDriverVersion());

	conn = DriverManager.getConnection("jdbc:sqlserver://<Server>;DatabaseName=<DatabaseName>", 
"<UserId>","<Passwd>");
	dbmd = conn.getMetaData();
	System.out.println("Driver = " + dbmd.getDriverName() + "_" + dbmd.getDriverVersion());
	displayVersions(conn);
	}

	public static void displayVersions(Connection conn)
       	{
               Statement s3 = null;
               ResultSet rr = null;

               try
               {
                       s3 = conn.createStatement();
                       System.out.println("\nStart trying to retreive data\n");
                       rr = s3.executeQuery("select @@version");

                       boolean OK = rr.next();
                       if (OK)
                               System.out.println("The current version of Microsoft SQL Server is: " + rr.getString(1));
                       else
                               System.out.println("result set NO ROWS!");
               }
               catch (Exception ex)
               {
                       System.out.println("Caught error in displayAnyData:\n\t" + ex.getMessage());
               }

               try
               {
                       if (rr != null) rr.close();
                       if (s3 != null) s3.close();
                       System.out.println("End trying to retreive data\n");
               }
               catch (Exception ee)
               {
                       System.out.println("Error closing rr or s3 in displayData: " + ee.getMessage());
               }

	}

	}
?????? ???????? ??? ?????? ??? ??????? ??????? ??????? ???????:
  • ??????? <Server> ?? ??? ???? SQL Server.
  • ??????? <DatabaseName> ?? ??? ????? ????????.
  • ??????? <UserId> ??????? ????????
  • ??????? <PassWd> ?? ???? ?????? ?????? ??.

?????

????? ?? ????????? ??? JDBC ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
313100????? ?????? ?? ????? ?? Microsoft JDBC
?????? ?????? ?????? ???????? ?? ??? ??????? ???? ????? ?????? ?????? ?? Microsoft. ?? ???? Microsoft ?? ???? ? ?????? ?? ??????? ????? ???? ?? ???? ?????? "?? ??? ????????.

???????

???? ???????: 915834 - ????? ??? ??????: 23/????? ???????/1427 - ??????: 1.0
????? ???
  • Microsoft SQL Server 2000 Driver for JDBC
????? ??????: 
kbmt kbhotfixserver kbqfe kbfix KB915834 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????915834
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com