I think we've all seen this one:
Microsoft VBScript runtime error '800a01c2' Wrong number of arguments or invalid property assignment: '<object.method>' |
This can happen when trying to call a method like a property, or vice-versa; or by calling a method of a built-in object, and passing in too many arguments.
However, the most common cause I've seen for this is using ADODB.Recordset to create a new record, and then have something like this:
<% ' ... RS.Fields.Item("ColumnName") = "someString" ' ... %> |
To resolve, you have one of two options. The first is to use an INSERT statement directly against a connection object; this is both more efficient and less error-prone. The second is to use either of the following syntax styles:
<% ' ... RS.Fields("ColumnName") = "someString" ' or RS.Fields.Item("ColumnName").Value = "someString" ' ... %> |