在clsDs.GetRs检查条件时出错

时间:2014-05-29 06:43:12

标签: vb.net visual-studio-2010 .net-4.0

我在Dim rsChk = clsDs.GetRs收到错误。 说错误 - 重载解析失败,因为没有可访问的' GetRs'接受这个数量的论点。任何帮助将不胜感激。

我在Dim rsChk = clsDs.GetRs收到错误。 说错误 - 重载解析失败,因为没有可访问的' GetRs'接受这个数量的论点。任何帮助将不胜感激。

  Private Function Exclude_Withoutchecking() As Boolean
    Try

        'Select Mid(Trim(TxtIdNoMrNo.Text), 1, 2)
        'If Len(TxtMRNo.Text) = 10 Then
        Select Case Mid(Trim(TxtMRNo.Text), 1, 2)
            Case "RC", "PE", "PT", "IQ"
                Exclude_Withoutchecking = True

            Case Else
                Exclude_Withoutchecking = False
        End Select
        'Exit Function
        'End If


        clsDs = New classDataSource
        clsDs.Add("MLab_ExcludeCheckingFor_MRNO_DentalClinics", "@pMrno", SqlDbType.NVarChar, 10, Trim(TxtMRNo.Text))
        clsDs.Add("", "@pReferFrom", SqlDbType.NVarChar, 18, cmb_Location.Text)
        clsDs.Add("", "@pVisitId", SqlDbType.Int, 10, CheckNullInteger(VisitId))
        Dim DtVwPendRecs = clsDs.GetRs("ConnPatInfo", 0)

        ''Using rsChk As SqlDataReader = clsDs.GetRs("ConnMedicalLab", 0)
        ' End Using

        Dim rsChk = clsDs.GetRs
        'Dim rsChk As SqlDataReader
        If rsChk Is Nothing Then
            Exclude_Withoutchecking = True
            Exit Function
        End If
        If rsChk.state = 0 Then
            Exclude_Withoutchecking = True
            Exit Function
        End If

        If rsChk.RecordCount > 0 Then
            If CheckNullInteger(rsChk.Fields(0)) > 0 Then
                Exclude_Withoutchecking = False
            Else
                Exclude_Withoutchecking = True
            End If
        End If

    Catch ex As Exception
        MsgBox(Err.Description, vbCritical)
    End Try      
    End Function

0 个答案:

没有答案