SUMMARY
The MFC ODBC classes attempt to update the CByteArray data
for a record each time you move off that record, even if the data was not
changed.
If you have a field that cannot be updated, you may receive
an error when the update fails. For example, if your recordset contains a SQL
Server TIMESTAMP column, you may see the following error:
Can't update a TIMESTAMP column.
The RFX_Binary()
function is incorrectly casting the BYTE* data member of the CByteArray to a
CByteArray*. Because of this, the CByteArray data always appears to have been
changed since the last update. In the DoFieldExchange() of your recordset
class, replace calls to RFX_Binary() with calls to the with RFX_Binary_Fix()
function.
The
following files are available for download from the Microsoft Download
Center:
Rfxbinfx.exe For additional information about how
to download Microsoft Support files, click the following article number to view
the article in the Microsoft Knowledge Base:
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 to
prevent any unauthorized changes to the file.
Microsoft has confirmed this to be a bug in the Microsoft
products listed at the beginning of this article. This bug was corrected in
Visual C++ version 5.0.