Article ID: 913765 - Last Review: December 3, 2007 - Revision: 1.5

FIX: An SqlException exception may occur when you call one of the Execute methods on the instance of the SqlCommand class in an ADO.NET 2.0 application

On This Page

Expand all | Collapse all

SYMPTOMS

Consider the following scenario:
  • In a Microsoft ADO.NET 2.0 application, you open a database connection by using an instance of the SqlConnection class in the System.Data.SqlClient namespace.
  • You call the Prepare method on an instance of the SqlCommand class.
  • You close and then reopen the database connection.
  • You call one of the Execute methods on the instance of the SqlCommand class.
In this scenario, an SqlException exception may occur. When this problem occurs, you may receive an error message that resembles the following:
SqlException (0x80131904): Could not find prepared statement with handle 1.

RESOLUTION

To resolve this problem, download the appropriate file for the computer.

For an x86-based computer

The following file is available for download from the Microsoft Download Center:

Collapse this imageExpand this image
Download
Download the NDP20-KB916002-X86.exe package now. (http://download.microsoft.com/download/2/c/5/2c5bcdc9-3241-443a-9f96-4e0b0edfa727/ndp20-kb916002-x86.exe)

For an x64-based computer

The following file is available for download from the Microsoft Download Center:

Collapse this imageExpand this image
Download
Download the NDP20-KB916002-X64.exe package now. (http://download.microsoft.com/download/d/3/9/d39c79df-4158-45df-9031-92c52ab0ed19/ndp20-kb916002-x64.exe)

For an Itanium-based computer

The following file is available for download from the Microsoft Download Center:

Collapse this imageExpand this image
Download
Download the NDP20-KB916002-IA64.exe package now. (http://download.microsoft.com/download/0/0/3/00392dd3-5b4f-4d99-94e8-6827b8f8d7ef/ndp20-kb916002-ia64.exe)

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591  (http://support.microsoft.com/kb/119591/ ) How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://support.microsoft.com/kb/824684/ ) Description of the standard terminology that is used to describe Microsoft software updates
This hotfix is included in the same hotfix package as the hotfixes that are described in the following Microsoft Knowledge Base articles. For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
912151  (http://support.microsoft.com/kb/912151/ ) FIX: The connection may time out before the first try to connect to the failover partner server when you try to connect to a SQL Server 2005 mirrored database by using an ADO.NET 2.0-based application
912731  (http://support.microsoft.com/kb/912731/ ) FIX: When an ADO.NET-connected application uses the System.Data.SqlClient namespace, the application may experience high CPU use and may stop responding
912732  (http://support.microsoft.com/kb/912732/ ) FIX: An error may occur when you start a new transaction in ADO.NET 2.0 on a connection that is open to a SQL Server 2005 database
913176  (http://support.microsoft.com/kb/913176/ ) FIX: A connection failure may be reported even though the database server is actually available when you try to connect to a database by using the SqlConnection object in ADO.NET 2.0
913177  (http://support.microsoft.com/kb/913177/ ) FIX: You may receive an error message when an ADO.NET-connected application uses the SqlBulkCopy class
913764  (http://support.microsoft.com/kb/913764/ ) FIX: Error message when you try to run a UNION ALL query or to call the DeriveParameters method: "Internal connection fatal error"
913766  (http://support.microsoft.com/kb/913766/ ) FIX: A DateTime column that does not contain any data is incorrectly represented by a DateTime.MinValue field when a .NET Framework 2.0 DataSet object is deserialized on a client computer

APPLIES TO
  • Microsoft .NET Framework 2.0
Keywords: 
kbqfe kbhotfixserver kbfix kbbug kbpubtypekc KB913765
 

Article Translations

 

Related Support Centers