You are currently offline, waiting for your internet to reconnect

Your browser is out-of-date

You need to update your browser to use the site.

Update to the latest version of Internet Explorer

FIX: Error "Wrong Number of Arguments or Invalid Property Assignment: 'Item'" When You Set Field Value in ASP Using ADO 2.5

Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Symptoms
When you try to update a field in an ADO recordset in Microsoft Active Server Pages (ASP), the following error may occur on a line that assigns a value to a field:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'Item'
Cause
This error occurs when you use the following syntax to assign a value to a field:
rs.Fields.Item("LName") = "Smith"				
This syntax does not specify the Value property, which is the default property. Although it not necessary to specify the Value property in ADO 2.1 and earlier, the absence of the Value property in ADO 2.5 causes the above-mentioned error message.
Resolution
To resolve this problem, download Microsoft Data Access Components (MDAC) version 2.6 or later. You can obtain the latest version of MDAC from the following Microsoft Web site:To work around this problem, use one of the following methods:
  • Specify the Value property explicitly, for example:
    rs.Fields.item("LName").value = "Smith" 					
  • Avoid using the Item object, for example:
    rs.Fields("Lname") = "Smith"					
Status
Microsoft 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 MDAC 2.6 or later.
800a01c2
Properties

Article ID: 305463 - Last Review: 06/19/2014 13:21:00 - Revision: 3.0

  • kbbug kbfix KB305463
Feedback
://c1.microsoft.com/c.gif?DI=4050&did=1&t="> var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" e';document.getElementsByTagName('head')[0].appendChild(m);" onload="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?">