0

Hi all !

I'm using vs2008, sqlserver2008 and vb.net as language.

I would like to ask, i got this line of error when i'm debugging my code

----Too many arguments to 'Public Function getDrawingNumber(PlcCode As String) As System.Data.DataSet'.----

below is my program code :

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim clsDrawNum As New DrawingNumber()
            Dim dsDraw As DataSet
            Dim PlcCode As String

            dsDraw = clsDrawNum.getDrawingNumber(drpPlaceOfOrig.SelectedValue, PlcCode)

        End Sub





    Public Function getDrawingNumber(ByVal PlcCode As String) As DataSet
        Dim ToEDCConn As New DBConnection("", "TOEDC_Conn")
        Dim ds As DataSet

        Try
            ds = ToEDCConn.RunSqlReturnDS("select * from Place where PlaceCode = '" + PlcCode + "'")
            Return ds
        Catch ex As Exception
            LogManager.WriteLog(ex.Message)
            Throw New Exception(ex.Message)
        Finally
            ToEDCConn.CloseConnection()
        End Try
    End Function

Anyone here would like to help me to solve this error? :(

2
Contributors
2
Replies
10
Views
1 Year
Discussion Span
Last Post by nimz143
0

The problem is exactly like the error says. You're trying to pass 2 arguments to a function that only requires 1.

dsDraw = clsDrawNum.getDrawingNumber(drpPlaceOfOrig.SelectedValue, PlcCode)

Edited by tinstaafl

0

Hi tinstaafl !

Alright, i try to fixed the error. thank you for your response :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.