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


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros