Article ID: 838610 - View products that this article applies to.
You have a Java application that uses the Java Database Connectivity (JDBC) API to retrieve a ResultSet object by using the Microsoft SQL Server 2000 Driver for JDBC. When you try to read a field from the ResultSet object by using the methods in the JDBC API, you may receive an error message that is similar to the following:
Note <index> is a placeholder for the index of the column that is being retrieved.
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Column index <index> is out of range.
This problem occurs when all the following conditions are true:
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
Date Time Version Size File name -------------------------------------------------------------- 13-Jun-2003 09:22 2.2.0036 286,818 Msbase.jar 13-Jun-2003 09:22 2.2.0036 67,159 Mssqlserver.jar 13-Jun-2003 09:22 2.2.0036 58,903 Msutil.jar
To work around this problem, explicitly specify the required field names in the SELECT Transact-SQL statement instead of using the asterisk (*) to represent all the fields from the respective tables.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/824106/ )PRB: "ResultSet can not re-read row data"' error when reading data from a JDBC ResultSet object
827221For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/827221/ )FIX: Unsupported data conversion error occurs when you use a Null timestamp in JDBC
(http://support.microsoft.com/kb/824684/ )Description of the Standard Terminology That Is Used to Describe Microsoft Software Updates
Article ID: 838610 - Last Review: October 5, 2005 - Revision: 2.2
Contact us for more help
Connect with Answer Desk for expert help.