W
Will Chamberlain
I am currently converting some VB.NET web apps to C#. It has been pretty
seamless so far but have currently run into some problems that I can't
resolve. The line that generates the error is:
The specific error is:
CS1502: The best overloaded method match for
'_Default.PopulateDrawingList(string)' has some invalid arguments
This is what is highlighted:
<aspataList ID="dlSheetType" cssclass="datalist1" DataSource='<%#
PopulateDrawingList(DataBinder.Eval(Container.DataItem,
"DrawingNumber")) %>' Runat="server">
The function referenced is:
public DataSet PopulateDrawingList(string DrawingNumber)
{
string strSQL = "SELECT Drawing, DCN, SheetNumber, SheetType, ADCN FROM
vwAllLatestrevSheetsWithADCN WHERE (Drawing = '" + DrawingNumber + "')
AND (State = 8) ORDER BY SheetType, SheetNumber, DCN, ADCN";
Dataset ds = new DataSet();
OleDbDataAdapter cm = new OleDbDataAdapter(strSQL, objConnSQL);
cm.Fill(ds, "DataTable");
ds.Tables["DataTable"].Columns.Add("NewADCN");
int dsRowCount = ds.Tables[0].Rows.Count;
for (int i=0; i <= dsRowCount; i++)
{
if (ds.Tables["DataTable"].Rows["ADCN"] is DBNull)
{ds.Tables["DataTable"].Rows["NewADCN"] = " ";}
else
{ds.Tables["DataTable"].Rows["NewADCN"] =
ds.Tables["DataTable"].Rows["ADCN"];}
}
return ds.Tables[0];
}
Any suggestions as to where I can look to correct this problem?
seamless so far but have currently run into some problems that I can't
resolve. The line that generates the error is:
The specific error is:
CS1502: The best overloaded method match for
'_Default.PopulateDrawingList(string)' has some invalid arguments
This is what is highlighted:
<aspataList ID="dlSheetType" cssclass="datalist1" DataSource='<%#
PopulateDrawingList(DataBinder.Eval(Container.DataItem,
"DrawingNumber")) %>' Runat="server">
The function referenced is:
public DataSet PopulateDrawingList(string DrawingNumber)
{
string strSQL = "SELECT Drawing, DCN, SheetNumber, SheetType, ADCN FROM
vwAllLatestrevSheetsWithADCN WHERE (Drawing = '" + DrawingNumber + "')
AND (State = 8) ORDER BY SheetType, SheetNumber, DCN, ADCN";
Dataset ds = new DataSet();
OleDbDataAdapter cm = new OleDbDataAdapter(strSQL, objConnSQL);
cm.Fill(ds, "DataTable");
ds.Tables["DataTable"].Columns.Add("NewADCN");
int dsRowCount = ds.Tables[0].Rows.Count;
for (int i=0; i <= dsRowCount; i++)
{
if (ds.Tables["DataTable"].Rows["ADCN"] is DBNull)
{ds.Tables["DataTable"].Rows["NewADCN"] = " ";}
else
{ds.Tables["DataTable"].Rows["NewADCN"] =
ds.Tables["DataTable"].Rows["ADCN"];}
}
return ds.Tables[0];
}
Any suggestions as to where I can look to correct this problem?