Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wrong number of arguments

Status
Not open for further replies.

s4dadmin

Programmer
Joined
Apr 27, 2003
Messages
107
Location
US
I am receiving an error that I don't understand

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'Category'

/error.asp, line 125

Here is the line of code(125)
objASPError.Category = Replace(objASPError.Category, "'", "''")

Can anyone help with this error?
 
what is objASPError.Category?

before the replace line try a:
response.write objASPError.Category

does this also throw the error?

Known is handfull, Unknown is worldfull
 
Usualy objASPError should be an read only object.
I presume it's the Error Object and this it's readonly object.

________
George, M
 
I forgot 1 more thing, if it's your object(class) you should have both definitions there Get and Set

Public Property Category() As String
Get
Return PropertyValue
End Get
Set(ByVal Value As String)
PropertyValue = Value
End Set
End Property


________
George, M
 
Yes this is the error object. I have it setup to automatically send an email then save to a database.
How do you make it a readonly object?

The contents of objASPerror.Category was
Microsoft VBScript runtime
 
You doing 1 thing wrong. You try to set an property to the error object this is not posible.
Incorect
objASPError.Category = Replace(objASPError.Category, "'", "''")

You should try this way.
Corect
strErr = Replace(objASPError.Category, "'", "''")

and now send the strErr to the email.


________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top