programacion traductor

Páginas: 2 (298 palabras) Publicado: 24 de noviembre de 2014
Imports System.Data
Imports System.Data.OleDb

Public Class Traductor
Dim adaptador As New OleDbDataAdapter
Dim registro As New DataSet
Dim conexion As New OleDbConnectionPrivate Sub Traductor_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try 'verdad
conexion.ConnectionString = "Provider =Microsoft.ACE.OLEDB.12.0;Data Source = ..\Base.accdb"
conexion.Open()

Catch ex As Exception
'falso
MsgBox("Error al conectar la BD", vbCritical, "Sin Conexion")End Try
End Sub

Private Sub Btntraduce_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btntraduce.Click
Dim ingles As String
Dim listas As ByteIf TextIngles.Text "" Then
ingles = "SELECT * FROM traductor WHERE ingles = '" & TextIngles.Text & "'"
adaptador = New OleDbDataAdapter(ingles, conexion)
registro= New DataSet
adaptador.Fill(registro, "traductor")
listas = registro.Tables("traductor").Rows.Count

If listas 0 Then

TextIngles.Text =registro.Tables("traductor").Rows(0).Item("ingles")
TextEspañol.Text = registro.Tables("traductor").Rows(0).Item("español")

Else
MsgBox("No Existe en eldiccionario", vbCritical, "Atencion")
'TextIngles.Enabled = False
'TextEspañol.Enabled = True

End If

End If
End Sub

Private SubBtnnew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnnew.Click
TextEspañol.Text = ""
TextIngles.Text = ""
TextIngles.Focus()
End SubPrivate Sub TextIngles_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextIngles.TextChanged

End Sub
End Class


JUSTIFICACION
Mi intención como aprendiz...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • LENGUAJES DE PROGRAMACION Y TRADUCTORES
  • traductor
  • Traductores
  • traductora
  • Traductor
  • Traductores
  • Traductorado
  • traductorado

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS