FIX: The SQLGetData function may return zero for the actual size of the data that is to be copied when you use the function to retrieve data for a binary column in SQL Server 2005

Article translations Article translations
Article ID: 950189 - View products that this article applies to.
Bug #: 50002580 (SQL Hotfix)
Microsoft distributes Microsoft SQL Server 2005 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release.
Expand all | Collapse all

On This Page

SUMMARY

This article describes the following about this hotfix release:
  • The issues that are fixed by the hotfix package
  • The prerequisites for installing the hotfix package
  • Whether you must restart the computer after you install the hotfix package
  • Whether the hotfix package is replaced by any other hotfix package
  • Whether you must make any registry changes
  • The files that are contained in the hotfix package

SYMPTOMS

Consider the following scenario. On an instance of Microsoft SQL Server 2005, you install Cumulative Update 6 for SQL Server 2005 Service Pack 2 (SP2). You create a table that contains a binary type column, such as an image column. You have an application that uses the SQL Native client ODBC driver to connect to the instance of SQL Server. In the application, you use the SQLGetData function to retrieve the data of the column. In this scenario, the function may return zero for the actual size of the data that is to be copied. This problem occurs when the following conditions are true:
  • You specify the TargetType parameter of the SQLGetData function as SQL_C_CHAR or as SQL_C_WCHAR.
  • You specify the BufferLength parameter of the SQLGetData function as 0.
For example, this issue occurs when you use the Osql.exe utility to retrieve data from an image column.

CAUSE

The SQLGetData function lets an application query the size of the data that is to be copied before the application provides a buffer to copy the data. This problem occurs when a user requests the data size of a binary type column by using a buffer size of 0 specified in the SQLGetData function. The function incorrectly returns zero instead of returning the actual size of the data that is to be copied.

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. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

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, contact 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 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.
SQL Native Client, 32-bit version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqlncli.dll2005.90.3239.02,237,46410-Apr-0804:12
Sqlnclir.rll2005.90.1399.0205,52814-Oct-0503:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
SQL Native Client, x64-based version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqlncli.dll2005.90.3239.02,757,65611-Apr-0815:32
Sqlnclir.rll2005.90.1399.0206,04014-Oct-0514:31
Sqlncli.dll2005.90.3239.02,237,46410-Apr-084:12
Sqlnclir.rll2005.90.1399.0205,52814-Oct-0503:48
Msvcm80.dll8.0.50727.42516,09622-Sep-0523:27
Msvcp80.dll8.0.50727.421,097,72822-Sep-0523:28
Msvcr80.dll8.0.50727.42822,78422-Sep-0523:26
Msvcm80.dll8.0.50727.42516,09622-Sep-0523:27
Msvcp80.dll8.0.50727.421,097,72822-Sep-0523:28
Msvcr80.dll8.0.50727.42822,78422-Sep-0523:26
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
SQL Native Client, Itanium-based version
Collapse this tableExpand this table
File nameFile versionFile sizeDateTime
Sqlncli.dll2005.90.3239.05,425,17611-Apr-0801:45
Sqlnclir.rll2005.90.1399.0205,01614-Oct-0514:39
Sqlncli.dll2005.90.3239.02,237,46410-Apr-0804:12
Sqlnclir.rll2005.90.1399.0205,52814-Oct-0503:48
Msvcm80.dll8.0.50727.42572,41622-Sep-0523:29
Msvcp80.dll8.0.50727.421,385,47222-Sep-0523:31
Msvcr80.dll8.0.50727.421,484,80022-Sep-0523:28
Msvcm80.dll8.0.50727.42572,41622-Sep-0523:29
Msvcp80.dll8.0.50727.421,385,47222-Sep-0523:31
Msvcr80.dll8.0.50727.421,484,80022-Sep-0523:28
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48
Msvcm80.dll8.0.50727.42479,23222-Sep-0523:48
Msvcp80.dll8.0.50727.42548,86422-Sep-0523:48
Msvcr80.dll8.0.50727.42626,68822-Sep-0523:48

STATUS

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

MORE INFORMATION

This issue occurs if the build of the Sqlncli.dll file is 2005.90.3228.0. You can find the Sqlncli.dll file in the %Windir%\System32 directory.

Steps to reproduce the problem

  1. Use the Osql.exe utility to connect to an instance of SQL Server 2005. To do this, run the following command.
    osql -E –S <Instance of SQL Server>
  2. Query a table that is named Test. The Test table contains an image column that is named A1. To do this, run the following statements.
    create table test (a1 image)
    go
    insert into test (a1) values ('aaaaa')
    go
    select * from test
    go
    
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

Important information for SQL Server 2005 Analysis Services

A known issue exists in Cumulative Update 7 for SQL Server 2005 Analysis Services. Consider the following scenario. You install Cumulative Update 7 for SQL Server 2005 SP2. In SQL Server Profiler, you start a trace or stop a trace. Then, you run a query. The execution time of the query exceeds the value of the ForceCommitTimeout server setting. In this scenario, all the queries that are running on the server are canceled. To work around this issue, do not run MDX queries before you start a trace or stop a trace.

Properties

Article ID: 950189 - Last Review: May 6, 2008 - Revision: 3.1
APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
Keywords: 
kbautohotfix kbhotfixrollup kbfix kbpubtypekc kbqfe kbexpertiseadvanced kbhotfixserver KB950189

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