troubleshooting Question

Overload resolution failed because no accessible 'Fields' accepts this number of arguments.

Avatar of ljhodgett
ljhodgett asked on
Visual Basic.NET
2 Comments1 Solution642 ViewsLast Modified:
Hi Experts,

I have the following code: -

Dim rs As ADODB.Recordset

        rs = conn.Execute("SELECT * FROM config")

        Me.Text = rs!RigTitle
        MyString = rs!SSDNo
        If MyString.Length = 4 And IsNumeric(rs!SSDNo) Then
            TxtSSDNo.Text = rs!SSDNo
            ErrorNo = 2
        End If

        MyString = rs!RoutingStage
        If MyString.Length = 3 And IsNumeric(rs!RoutingStage) Then
            StageRef = rs!RoutingStage
            ErrorNo = 3
        End If

        WorkingDatabase = "testdata"
        If WorkingDatabase = "" Then
            ErrorNo = 4
        End If

        If Not IsNumeric(rs!comsport890) Then
            ErrorNo = 5
            CommsPort = CDec(rs!comsport890)
        End If

        If Not IsNumeric(rs!CtrlPort890) Then
            ErrorNo = 6
            ControlPort = CDec(rs!CtrlPort890)
        End If

        If Not IsNumeric(rs!MeterPort) Then
            ErrorNo = 7
            MeterPort = CDec(rs!MeterPort)
        End If


This has been taken from a vb6 program. When I place it into 2005 I get the error message and an underline on all parts of code that start “rs!” ie, “rs!MeterPort”: -

Overload resolution failed because no accessible 'Fields' accepts this number of arguments.      

What is this please and how do I overcome this. Sorry I’m new to and currently migrating from vb6.

Many Thanks


Éric Moreau
Senior .Net Consultant
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 2 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 2 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004