Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7836293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:05:10+00:00 2026-06-02T14:05:10+00:00

I don’t have any experience programming with VBScript and I’d like to use some

  • 0

I don’t have any experience programming with VBScript and I’d like to use some OOP approach. If you’ll look at my code below, you will see that I’m trying to create DB access class with a set of methods, that returns data sets. Have no idea why, but receiving error:

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment

/TrashCan/library/BLL/CreditBLLClass.asp, line 18 

I have an .asp page:

<body>
    <!-- #INCLUDE FILE="library\BLL\CreditBLLClass.asp" -->
    <%             
        Dim creditBLL
        Dim reader
        creditBLL = new CreditBLLClass

            reader = creditBLL.GetData() 
            If reader.EOF = False Then
                Do While reader.EOF = False
                    Response.Write(reader.Fields("a").Value)
                    reader.MoveNext
                Loop    
            End If
    %>
</body>

CreditBLLClass.asp:

<!-- #INCLUDE FILE="DatabaseConnectionClass.asp" -->
<%
Class CreditBLLClass
    'Private variables
    Dim connection

    Public Default Function Init()
        Set Init = Me
      End Function

    Public Function GetData ()
        connection = new DatabaseConnectionClass
        GetData = connection.DBGetRecords("select a from b")
    End Function
End Class

%>

And database connection class

<% 

Class DatabaseConnectionClass

'Private variables
dim pConnection

Public Default Function Init()

    Set Init = Me
  End Function

Public Function DBGetRecords ( sSQL )

    Set pConnection = Server.CreateObject( "ADODB.Connection" )
    With pConnection
            .ConnectionString = "string"
            .Open
         End With
        DBGetRecords = pConnection.Execute ( sSQL )
End Function

End Class

%>

Please tell me what am I doing wrong? Maybe there is a common approach of how to build data access layer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T14:05:12+00:00Added an answer on June 2, 2026 at 2:05 pm

    The error is in the invalid property assignment part of the error.

    From your code:

    connection = new DatabaseConnectionClass
    GetData = connection.DBGetRecords("select a from b")
    

    You have to use Set when using objects.

    Change it to this:

    Set connection = new DatabaseConnectionClass
    Set GetData = connection.DBGetRecords("select a from b")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't they both have to convert to machine code at some point to execute
I don't have any experience in updating a Rails app and when I google
don't know better title for this, but here's my code. I have class user
Don't be afraid to use any technical jargon or low-level explanations for things, please.
I don't like Jackson. I want to use ajax but with Google Gson. So
I don't have much PHP experience and I want to know how to best
Don't be scared of the extensive code. The problem is general. I just provided
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
(Don't know if this is strictly on-topic, but I don't see any better Stack

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.