Código:
El error sale en las lineas de color rojo.Public Function ChekarRucClienteRegistrado(ByVal cRuc As String) As Boolean Dim chRuc As Boolean Dim nResult As Integer Dim StrRuc As String = "SELECT cli_ruc FROM clientes WHERE cli_ruc = '" & cRuc & "'" Select Case nServer Case "MySql" Me.cmdFactMySql = New MySqlCommand(StrRuc, Me.cnFactMySql) nResult = CInt(Me.cmdFactMySql.ExecuteScalar()) Case "Sql" Me.cmdFactSql = New SqlCommand(StrRuc, Me.cnFactSql) nResult = CInt(Me.cmdFactSql.ExecuteScalar()) End Select If nResult = 0 Then chRuc = False Else chRuc = True End If Return chRuc End Function
Espero que puedan ayudarme y como puedo solucionarlo.