The information in this article applies to:
SYMPTOMSWhen using JavaScript to set a variable equal to a field value in a Recordset object--that is, myField = RS.Fields("FieldName")--the value in the variable changes when a rs.MoveNext() is performed. CAUSEIn JavaScript, Recordset.Fields() returns an ADO Field Object rather than the value stored in that field, thus when an RS.MoveNext() is performed, the values in the properties of the Field Object are changed, most notably the ".value" property. RESOLUTIONUse the ".value" property if your intention is to return the value of the field in the recordset object rather than a Field Object, for example:
STATUSThis behavior is by design. MORE INFORMATIONThe following Active Server Pages (ASP) sample code demonstrates how to return the value of the field in the recordset object.
Additional query words:
Keywords : kbADO kbASP kbDatabase kbJScript kbVisID100 kbVisID600 kbGrpASP kbGrpMDAC kbDSupport kbADO210sp2 |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |