Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/03/2010, 09:31
Ka0stj
 
Fecha de Ingreso: febrero-2010
Ubicación: México
Mensajes: 738
Antigüedad: 14 años, 2 meses
Puntos: 37
Respuesta: TextBox, DataGridView y BD

Hola piter2009

Puedes hacer una consulta a tu Base de Datos y contar los registros que coincida con el dato que quieres ver si esta registrado en tu BD.

Por ejemplo:

Código vb:
Ver original
  1. Dim valor as Integer
  2. Dim Comando As New SqlClient.SqlCommand()
  3. Comando.CommandType = System.Data.CommandType.Text
  4. Comando.CommandText = "SELECT COUNT(ID) FROM EMPLEADOS WHERE NOMBRE = '" & textbox1.Text & "'"
  5. Comando.Connection = Conexion 'Tu conexión
  6.  
  7. valor = Comando.ExecuteEscalar()

Si tu consulta te regresa un valor => 1 significa que ya existe. Suerte...