datatable to many arguments

frutuopa

Member
Joined
Apr 4, 2022
Messages
12
Programming Experience
10+
Hello

I have a form in a very large project that suddenly generated a series of errors that I can't overcome... one of them is the following:

Dim dt1 As DataTable
Dim myrows1 As DataRow() = dt1.Select("a=1")

i have a message
Too many arguments to 'Sub [Select]()'.

but, if i do the same on a class

Function teste()
Dim dt As DataTable
Dim myrows As DataRow() = dt.Select("a=1")

End Function

everything is fine
can you understand this?

Can you help?
Thanks
Visual studio 2022
 
Right-click on the Select method that is not working and navigate to the declaration to see where that takes you. It's clearly not calling the method you expect.
 
Thanks for your answer

Right-click on the Select method that is not working
void Select();

Right-click on the Select method that is working (Another Form)
public DataRow[] Select(string filterExpression)
{
Bid.Trace("<ds.DataTable.Select|API> %d#, filterExpression='%ls'\n", ObjectID, filterExpression);
return new Select(this, filterExpression, "", DataViewRowState.CurrentRows).SelectRows();
}

Thanks
 
But are they taking you to the same class? Is it System.Data.DataTable in both cases? In the first case, can you see the method with one String argument in the same class?
 
Back
Top