|    
			
				10/11/2011, 09:37
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: abril-2005 
						Mensajes: 483
					 Antigüedad: 20 años, 6 meses Puntos: 3 |  | 
  |  Respuesta: No se controló MySqlException  
  Aquaventus. 
Con el código que me enviaste me sigue dando el mismo error.  
Pongo el código completo del procedimiento dónde asigno el valor a TxCalle.  Aquí si uso otro reader.   
Código:
      Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        Dim sql As MySqlCommand = New MySqlCommand
        Dim dr As MySqlDataReader
        If LaDepartamento.Text = "INEXISTENTE" Or Len(LaDepartamento.Text) = 0 Then
            MsgBox("Verifique el departamento", vbCritical, "Atención")
            TxDepartamento.Focus()
            Exit Sub
        End If
        If LaLocalidad.Text = "INEXISTENTE" Or Len(LaLocalidad.Text) = 0 Then
            MsgBox("Verifique la localidad", vbCritical, "Atención")
            TxLocalidad.Focus()
            Exit Sub
        End If
        TxBlock.Text = IIf(Len(Trim(TxBlock.Text)) = 0, 0, TxBlock.Text).ToString
        TxUnidad.Text = StrDup(4 - Len(Trim(TxUnidad.Text)), "0") & TxUnidad.Text
        TxParte.Text = IIf(Len(Trim(TxParte.Text)) = 0, 0, TxParte.Text).ToString
        sql.Connection = Conexion
        sql.CommandText = "SELECT * FROM inmuebles WHERE iddepartamento = '" & TxDepartamento.Text & "' AND idlocalidad = '" & TxLocalidad.Text & "' AND padron = '" & TxPadron.Text & "' AND block = '" & TxBlock.Text & "' AND unidad = '" & TxUnidad.Text & "' AND parte = '" & TxParte.Text & "'"
        sql.CommandType = CommandType.Text
        dr = sql.ExecuteReader()
        If dr.HasRows Then
            While dr.Read()
                TxCalle.Text = CStr(1)
            End While
            Agrega = False
        Else
            Agrega = True
        End If
        dr.Close()
        TabControl.Enabled = True
        sql = Nothing
        dr = Nothing
    End Sub
Sauldos     |