Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Go Back  Xtreme Visual Basic Talk > > > Importing Multiple rows of data from a fingerprint scanner using vb 6


Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2017, 10:55 AM
urusaki urusaki is offline
Newcomer
 
Join Date: Sep 2017
Posts: 1
Default Importing Multiple rows of data from a fingerprint scanner using vb 6


I am importing attendance data from a finger print scanner using it's sdk to applications Access Database. I have used a Data Grid View to show the data on the same button. However the datagrid showed all the data's from the machine but to the database, only the first row is being imported continuously. Needed help to modify the code to import complete datas. Here is my code for the Button,

Code:
With RawData
        .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db\dbase.mdb;Persist Security Info=False"
        .RecordSource = "select * from RawData"
        .Refresh          
       
    Do
    DoEvents       
    gridSLogData.Height = 4800
    gridSLogData.Redraw = False
    gridSLogData.Clear
    
    
     gstrLogItem = Array("", "TMachineNo", "EnrollNo", "EMachineNo", "InOut", "VeriMode", "DateTime")
    With gridSLogData
        .Row = 0
        .ColWidth(0) = 600
        For i = 1 To 6
            .Col = i
            .Text = gstrLogItem(i)
            .ColAlignment(i) = 3
            .ColWidth(i) = 1200
        Next i
        .Col = 6
        .ColWidth(5) = 2000
        .ColWidth(6) = 2000
        .ColWidth(7) = 100
        .ColWidth(8) = 100
        n = .Rows
        If n > 2 Then
            Do
                If n = 2 Then Exit Do
                .RemoveItem (n)
                n = n - 1
            Loop
        End If
        .Redraw = True
    End With       
    
    vRet = frm_DataImp.FP_CLOCK1.EnableDevice(mMachineNumber, False)
    If vRet = False Then
        lblMessage.Caption = gstrNoDevice
        MousePointer = vbDefault
        Exit Sub
    End If
    
    vRet = frm_DataImp.FP_CLOCK1.ReadAllGLogData(mMachineNumber)
    If vRet = False Then
        frm_DataImp.FP_CLOCK1.GetLastError vErrorCode
        lblMessage.Caption = ErrorPrint(vErrorCode)
    End If
    
    If vRet = True Then
        lblMessage.Caption = "Getting..."
        frm_DataImp.FP_CLOCK1.EnableDevice mMachineNumber, True
        MousePointer = vbHourglass
        DoEvents
        gridSLogData.Redraw = False        
        With gridSLogData
            i = 1
            Do

EEE:                vRet = frm_DataImp.FP_CLOCK1.GetAllGLogData(mMachineNumber, _
                                                 vTMachineNumber, _
                                                 vSEnrollNumber, _
                                                 vSMachineNumber, _
                                                 vVerifyMode, _
                                                 vYear, _
                                                 vMonth, _
                                                 vDay, _
                                                 vHour, _
                                                 vMinute)
                If vRet = False Then Exit Do
                If vRet = True And i <> 1 Then
                    .AddItem (1)
                End If
                vinouttype = Int(vVerifyMode / 8)
                vaction = vVerifyMode Mod 8
                .Row = i
                .Col = 0
                .Text = i
                .Col = 1
                .Text = vTMachineNumber
                .Col = 2
                .Text = vSEnrollNumber
                .Col = 3
                .Text = vSMachineNumber
                .Col = 4
                .Text = vinouttype
                .Col = 5                
                .Text = vaction & "/Normal"                 
                .Col = 6
                .Text = CStr(vYear) & "/" & Format(vMonth, "0#") & "/" & Format(vDay, "0#") & _
                        " " & Format(vHour, "0#") & ":" & Format(vMinute, "0#")            
                
                DoEvents
                i = i + 1
                If i > vMaxLogCnt Then Exit Do
            Loop
        End With
        
        If i > vMaxLogCnt Then
            gridSLogData.Height = gridSLogData.Height / 2
            
           
        End If
        vMaxLogCnt = vMaxLogCnt * 2
        If i > vMaxLogCnt Then
            gridSLogData.Height = gridSLogData.Height * 2 / 3
            
        End If
        gridSLogData.Redraw = True
        
        
        lblMessage.Caption = "ReadAllGLogData OK"
    End If
    
    'Writing to database
    '
    '
    '
    With .Recordset
    .AddNew
    !TMachineNo = vTMachineNumber
    !EnrollNo = vSEnrollNumber
    !EMachineNo = vSMachineNumber
    !InOut = vinouttype
    !VeriMode = vaction & "/Normal"
    !DateTime = CStr(vYear) & "/" & Format(vMonth, "0#") & "/" & Format(vDay, "0#") & _
                        " " & Format(vHour, "0#") & ":" & Format(vMinute, "0#")
    .Update
    
FFF:
        End With    
        Loop
        gGetState = False  
    
        If .Recordset.RecordCount > 1 Then .Recordset.MoveLast
    End With
Reply With Quote
  #2  
Old 09-14-2017, 04:41 AM
gibra's Avatar
gibra gibra is offline
Junior Contributor
 
Join Date: Apr 2008
Location: Italy
Posts: 386
Default

Data Grid View doesn't exists in VB6, it's a VB.NET control.
Are you sure to sure that you use VB6.0?
If yes, then DataGrid is the control you use, but this control work only in 'bound' mode.
So you should open a recordset and 'attach' to DataGrid using DataSource property.
See MSDN Library help file for more informations.
Reply With Quote
  #3  
Old 09-15-2017, 02:18 AM
Flyguy's Avatar
FlyguyImporting Multiple rows of data from a fingerprint scanner using vb 6 Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

Based on the used properties the MS(H)FlexGrid is used.
Reply With Quote
Reply

Tags
.col, vret, .text, false, true, vmaxlogcnt, gridslogdata.height, lblmessage.caption, exit, data, vaction, vtmachinenumber, gridslogdata.redraw, doevents, vinouttype, database, loop, vsmachinenumber, vsenrollnumber, tmachineno, enrollno, emachineno, inout, cstrvyear, formatvhour


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6 Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
 
Importing Multiple rows of data from a fingerprint scanner using vb 6
Importing Multiple rows of data from a fingerprint scanner using vb 6
 
-->