So i'm testing sample code and I pasted some online text into a field and i'm getting an error and I have no clue why. Here is the entire method which is throwing the error:
EDIT the error is coming from the assignment. However, there is no error thrown on any number of other input strings.
CurNodeName = RTrim(CurNodeName)
ADORecordset.Fields.Append CurNodeName, adVarChar, 500, adFldMayBeNull
tempString = XMLValueDecode(CurNodeValue)
ADORecordset.Fields(CurNodeName).Value = tempString
...
Here is the string which is being passed into the method:
Most of the methods of the DoCmd object have arguments ? some are required, while others are optional. If you omit optional arguments, the arguments assume the default values for the particular method. For example, the OpenForm method uses seven arguments, but only the first argument, FormName, is required. The following example shows how you can open the Employees form in the current database. Only employees with the title Sales Representative are included.
Here is the exact error description:
Multiple-step operation generated errors. Check each status value.
That is the whole story, and i just don't understand it. Can you tell me why this error is happening?
(From a comment to another answer:)
There must be some critical difference between adVarChar type and adVarWChar that the text being set responded differently to.
It was many versions ago (Access 2000, and the release of Jet 4.0) that Text
and Memo
fields in Access were upgraded to handle Unicode. From that point forward, Text
fields and parameters needed to be referenced as adVarWChar
(with a maximum length of 255), while Memo
fields and parameters needed to be referenced as adVarWChar
or adLongVarWChar
(with a theoretical size limit of approximately 1 billion characters).
It is unclear why the code in the question would work for some strings and not others, but certainly using the correct ("W") data type would be a prerequisite.