FIX: Problem Assigning ADO Recordset Numeric Fields to Another Field (247029)
The information in this article applies to:
- Microsoft Data Access Components 2.1 SP2
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.1 (GA)
- Microsoft Data Access Components 2.1 SP1
This article was previously published under Q247029 SYMPTOMS
Using MDAC 2.1 SP2 (build 2.1.2.4202.3) or earlier, when attempting to assign an ADO recordset field with Numeric data type to a second recordset field (for example, rs2!K2 = rs1!K1), the following error appears:
Run-time error '-2147217887 (80040e21)':
Error occurred.
This problem is observed when client side cursor is specified (adUseClient).
RESOLUTION
There are three ways to work around this problem:
- Use Server-side cursor (adUseServer).
- Assign field value to a variable, and then assign the variable to the field of the second recordset, such as:
myVar = rs1!K1
rs2!K2 = myVar
- Use the .Value property of the Column object, such as:
rs2("K2").Value = rs1("K1").Value
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Data Access Components version 2.5 or later. You can obtain the latest version of Microsoft Data Access Components form the following Microsoft Web site:
REFERENCESFor additional information about MDAC release history, click the article number below
to view the article in the Microsoft Knowledge Base:
231943 NFO: Microsoft Data Access Components (MDAC) Release History
Modification Type: | Minor | Last Reviewed: | 11/3/2003 |
---|
Keywords: | kbbug kbDatabase kbfix kbMDAC250fix KB247029 |
---|
|