06/03/2013, 10:28
|
| | | Fecha de Ingreso: julio-2011 Ubicación: Coahuila
Mensajes: 320
Antigüedad: 13 años, 4 meses Puntos: 8 | |
Consulta base de datos con lector de huella Hola a todos
tengo un lector de huella Uare U digital persona 4500.
Logre hacer que funcione correctamente el detalle es que mi bd cuenta con 300 registros y al tratar de buscar de uno por uno se tarda mas de 3 segundos en identificarme la huella
Codigo
Public a(1632) As Byte
Public huella(9999) As String
Public NOMBRE(9999) As String
Public NUMERO_OPERADOR(9999) As String
Public ARREGLO As Integer
Public strsqlmsql As String
Public mysqlconn As New MySqlConnection
Public mysqlcmd As New MySqlCommand
Public mysqldr As MySqlDataReader
Public mysqlda As New MySqlDataAdapter
EN FORM LOAD
Private Sub VerificationForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mysqlconn.ConnectionString = "server=localost; user id=root; password =; database = finger;"
Try
mysqlconn.Open()
strsqlmsql = " SELECT DISTINCT finger1,num_operador,nombre FROM general_empleados WHERE estatus ='ALTA' ORDER BY id_operador DESC "
mysqlcmd.CommandText = strsqlmsql
mysqlcmd.Connection = mysqlconn
mysqlda.SelectCommand = mysqlcmd
mysqldr = mysqlcmd.ExecuteReader
While (mysqldr.Read())
huella(ARREGLO) = mysqldr("finger1")
NUMERO_OPERADOR(ARREGLO) = mysqldr("num_operador")
NOMBRE(ARREGLO) = mysqldr("nombre")
ARREGLO += 1
End While
mysqlcmd.Dispose()
mysqldr.Close()
mysqlconn.Close()
Catch ex As Exception
End Try
mysqlconn.Close()
End Sub
VERIFICACION DE HUELLA
Sub OnComplete(ByVal Control As Object, ByVal FeatureSet As DPFP.FeatureSet, ByRef EventHandlerStatus As DPFP.Gui.EventHandlerStatus) Handles VerificationControl.OnComplete
Dim ver As New DPFP.Verification.Verification()
Dim res As New DPFP.Verification.Verification.Result()
Dim temp = New DPFP.Template()
Dim i As Integer
For i = 0 To ARREGLO
Try
a = Convert.FromBase64String(huella(Str(i)))
temp.DeSerialize(a)
ver.Verify(FeatureSet, temp, res)
Data.IsFeatureSetMatched = res.Verified
Data.FalseAcceptRate = res.FARAchieved
If res.Verified Then
EventHandlerStatus = DPFP.Gui.EventHandlerStatus.Success
LBL_HORA.ForeColor = Color.Green
LBL_DIA.ForeColor = Color.Green
LBL_NOMBRE_PERSONAL.ForeColor = Color.Green
IMAGEN_FOTO.BackColor = Color.Green
IMAGEN_PERSONAL.ImageLocation = "C:\FOTOGRAFIAS\" & NUMERO_OPERADOR(i) & ".jpg"
LBL_NOMBRE_PERSONAL.Text = i
CONTEO.Enabled = True
GoTo SALIDA
End If
If Not res.Verified Then EventHandlerStatus = DPFP.Gui.EventHandlerStatus.Failure
Data.Update()
Catch ex As Exception
End Try
Next
SALIDA:
End Sub
Este es mi codigo
no se como hacer para aguilizar la busqueda
Gracias. |