提示错误信息 重载决策失败,原因是没有可访问的“New”能够不经收缩转换即可被调用
'Public Sub New(selectCommandText As String, selectConnection As System.Data.SqlClient.SqlConnection)':
与参数“selectConnection”匹配的参数从“Object”类型转换为“System.Data.SqlClient.SqlConnection”类型。
'Public Sub New(selectCommandText As String, selectConnectionString As String)':
与参数“selectConnectionString”匹配的参数从“Object”类型转换为“String”类型。
解决方案:
Function CreateDataSource() As ICollection
Dim strSQL As String = "SELECT * FROM PRZ3_JOB_FRAMES where AJF_JOB_HEADER_ID=30" Dim adapter As New SqlDataAdapter(strSQL, CType(connString, String))
Dim dt As New DataTable
adapter.Fill(dt)
Dim dv As DataView = New DataView(dt)
Return dv
End Function