Microsoft KB Archive/156296

= PRB: CLongBinary Edits Fail with SQL Server Snapshot =

Article ID: 156296

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 5.0 Learning Edition

 Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.0 Professional Edition</li></ul>

 Microsoft Visual C++ 4.1 Subscription</li></ul>

 Microsoft Visual C++ 4.2 Professional Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q156296

<div class="symptoms_section">

SYMPTOMS
When calling CRecordset::Edit followed by CRecordset::Update to update an image field in a snapshot recordset, you may receive the following errors:

Incorrect syntax near the keyword 'UPDATE'.

State:37000,Native:156,Origin:[Microsoft][ODBC SQL Server Driver] [SQL Server]

Line 1: Incorrect syntax near '='.

State:37000,Native:170,Origin:[Microsoft][ODBC SQL Server Driver] [SQL Server]

<div class="cause_section">

CAUSE
There is a bug in the Microsoft SQL Server ODBC driver version 2.65.0201, which ships with Visual C++ version 4.2.

<div class="resolution_section">

RESOLUTION
Upgrade your SQL Server ODBC driver to version 2.65.0213, which comes with Microsoft Visual C++, Enterprise Edition, version 4.2 or with the Service Pack 1 for Microsoft SQL Server version 6.5.

<div class="moreinformation_section">

MORE INFORMATION
This problem occurs only when the cursor library is loaded and the recordset is opened as a snapshot. Dynasets without the cursor library do not display this problem.

<div class="references_section">