错误:没有为'Public Overridable Overloads Function Fill的参数'SiteId'指定参数(dataTable为LCSRDBDateSet.SampleDataTable,SiteId As String)As Integer'
我该如何解决这个问题?请帮忙。这不是我自己的代码。我正在研究其他的代码。
If String.IsNullOrEmpty(reportFilter) Then daSample.SetWhereClause(String.Format("cdr_site_id = '{0}' AND cdr_datetime BETWEEN '{1}' AND '{2}' AND cdr_extension_no IN({3}) AND cdr_call_type_id IN({4}) GROUP BY cdr_extension_id", siteId, startDateTime, endDateTime, callClass, callType))
Else
Dim filters2 = reportFilter.Split(",")
Dim ta2 As New LCSRDBDataSetTableAdapters.SampleTableAdapter
Dim dt2 = ta.GetData(siteId)
If filters.Count = dt.Rows.Count Then
daSample.SetWhereClause(String.Format("cdr_site_id = '{0}' AND cdr_datetime BETWEEN '{1}' AND '{2}' AND cdr_extension_no IN({3}) AND cdr_call_type_id IN({4}) GROUP BY cdr_extension_id", siteId, startDateTime, endDateTime, callClass, callType))
Else
daSample.SetWhereClause(String.Format("cdr_site_id = '{0}' AND cdr_datetime BETWEEN '{1}' AND '{2}' AND cdr_extension_no IN({3}) AND cdr_call_type_id IN({4}) GROUP BY cdr_extension_id", siteId, startDateTime, endDateTime, callClass, callType))
End If
End If
daSample.Fill(dtSample)
rdsSample.Name = "LCSRDBDataSet_Sample"
rdsSample.Value = dtSample
rvScreen.LocalReport.DataSources.Add(rdsSample)
答案 0 :(得分:1)
我认为你有一些错误:
If String.IsNullOrEmpty(reportFilter) Then daSample.SetWhereClause(String.Format("cdr_site_id = '{0}' AND cdr_datetime BETWEEN '{1}' AND '{2}' AND cdr_extension_no IN({3}) AND cdr_call_type_id IN({4}) GROUP BY cdr_extension_id", siteId, startDateTime, endDateTime, callClass, callType))
Else
Dim filters2 = reportFilter.Split(",")
Dim ta2 As New LCSRDBDataSetTableAdapters.SampleTableAdapter
Dim dt2 = ta.GetData(siteId)
If filters.Count = dt.Rows.Count Then
daSample.SetWhereClause(String.Format("cdr_site_id = '{0}' AND cdr_datetime BETWEEN '{1}' AND '{2}' AND cdr_extension_no IN({3}) AND cdr_call_type_id IN({4}) GROUP BY cdr_extension_id", siteId, startDateTime, endDateTime, callClass, callType))
Else
daSample.SetWhereClause(String.Format("cdr_site_id = '{0}' AND cdr_datetime BETWEEN '{1}' AND '{2}' AND cdr_extension_no IN({3}) AND cdr_call_type_id IN({4}) GROUP BY cdr_extension_id", siteId, startDateTime, endDateTime, callClass, callType))
End If
End If
1。首先不是逃避纠正,
2.你将vb与C#混合
3.您的错误产生于:“cdr_site_id ='{0}'和cdr_datetime BETWEEN'{1}'
因为未定义{0}和{1}或isNull
请通过这个例子学习:
VB.Net - Database Access
Programming Tutorials - VB.NET Tutorials
使用谷歌查找vb.net教程
祝好运!!并努力工作:)