FIX: The row count is incorrect after you run a "BULK INSERT" statement by using SQL Server JDBC driver 2.0 to insert data into a table

Article translations Article translations
Article ID: 975565 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You have an application that uses Microsoft SQL Server JDBC driver 2.0 to connect to an instance of SQL Server. In the application, you use the executeUpdate method to run a BULK INSERT statement to insert data into a table. However, after you run the statement, the row count of the result is incorrect.

Note This issue also occurs in Microsoft SQL Server JDBC driver 1.2.

CAUSE

This issue occurs because the SQL Server JDBC driver does not recognize the BULK INSERT statement as a Data Manipulation Language (DML) operation. Therefore, the row count of the result is ignored when you run the BULK INSERT statement.

RESOLUTION

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

No prerequisites are required.

Restart information

You do not have to restart the computer after you apply this hotfix.

Registry information

You do not have to change the registry.

Hotfix file information

This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain of all the files that you must have to fully update a product to the latest build. The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Windows, 32-bit version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,07010-Sep-200909:19
Sqljdbc4.jarNot Applicable466,38310-Sep-200909:19
Sqljdbc_auth.dll2.0.1803.20269,01610-Sep-200909:19
Xa_install.sqlNot Applicable3,71210-Sep-200909:19
Sqljdbc_xa.dll2.0.1803.202101,28810-Sep-200909:19
Windows, x64-based version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,07010-Sep-200909:19
Sqljdbc4.jarNot Applicable466,38310-Sep-200909:19
Sqljdbc_auth.dll2.0.1803.20286,44010-Sep-200909:19
Xa_install.sqlNot Applicable3,71210-Sep-200909:19
Sqljdbc_xa.dll2.0.1803.202130,45610-Sep-200909:19
Windows, Itanium architecture version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqljdbc.jarNot Applicable448,07010-Sep-200909:19
Sqljdbc4.jarNot Applicable466,38310-Sep-200909:19
Sqljdbc_auth.dll2.0.1803.202172,45610-Sep-200909:19
Xa_install.sqlNot Applicable3,71210-Sep-200909:19
Sqljdbc_xa.dll2.0.1803.202251,81610-Sep-200909:19
UNIX version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Sqljdbc.jarNot Applicable448,07011-Sep-200900:19Not Applicable
Sqljdbc4.jarNot Applicable466,38311-Sep-200900:19Not Applicable
Sqljdbc_auth.dll2.0.1803.202172,45611-Sep-200900:19IA-64
Sqljdbc_auth.dll2.0.1803.20286,44011-Sep-200900:19x64
Sqljdbc_auth.dll2.0.1803.20269,01611-Sep-200900:19x86
Xa_install.sqlNot Applicable3,71211-Sep-200900:19Not Applicable
Sqljdbc_xa.dll2.0.1803.202251,81611-Sep-200900:19IA-64
Sqljdbc_xa.dll2.0.1803.202130,45611-Sep-200900:19x64
Sqljdbc_xa.dll2.0.1803.202101,28811-Sep-200900:19x86

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 about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499 New naming schema for Microsoft SQL Server software update packages

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 975565 - Last Review: October 7, 2011 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
kbexpertiseadvanced kbfix kbautohotfix kbsurveynew kbqfe KB975565

Give Feedback

 

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