Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 686

[RESOLVED] Permission Denied on new Object

$
0
0
Hello,

I have copied the sample of a Class from the VBScript language reference:

Code:

Class Customer
    Private m_CustomerName

    ' CustomerName property.
    Public Property Get CustomerName
        CustomerName = m_CustomerName
    End Property

    Public Property Let CustomerName(custname)
        m_CustomerName = custname
    End Property
End Class

and a function to create a new Instance of Customer:


Code:

        Public Function doit ()
                        On Error Resume Next
                        Dim a
                        Set a = New Customer
                        If err.number <> 0 Then
                                %>Err: <%= err.Description & " " & err.Number %><%
                        End If
                        Set doit = a
        End Function

When I call the function with

Code:

Dim x
Set x = doit()

I see an Error: 70, Permission Denied.

I do not have any clue, why I receive a filesystem error here on a simple New statement.
Do you have an idea?

Thank you
mmu1


The problem has been solved using Arrays instead of a List of Classes

Viewing all articles
Browse latest Browse all 686

Trending Articles