Good Day,
I am writing a new program where i should transfer freshly extracted raw attendance record from a biometrics time recorder to windows based time keeping software
However when i tried importing it to my datatable/datagrid using the code below,
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim fileName As String = "record.txt"
Dim dirName As String = "C:\Users\Biometric\Desktop\"
Dim dt As DataTable
Using cn As New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;" & _
"Data Source=" & dirName & ";" & _
"Extended Properties=""Text;""")
cn.Open()
Using adapter As New OleDbDataAdapter( _
"SELECT * FROM " & fileName, cn)
dt = New DataTable("record")
adapter.Fill(dt)
Dim ds As New DataSet
Dim joy As New BindingSource
joy.DataSource = dt
DataGridView1.DataSource = joy
End Using
End Using
End Sub
it just simple transfer whole row into one column.
1 2006-10-12 14:04:47 1 0 1 0
1 2006-10-12 14:05:08 1 1 1 0
1 2006-10-12 14:06:13 1 0 1 0
Legend:
1st column User ID = Access ID #
2nd column Date & Time
3rd column Device number
4th column Transaction type
0 - check in
1 - check out
5 – OT in (available only in iClock260)
4 – OT out (available only in iClock260)
3 - break in (available only in U160, F4, iClock260)
2 - break out (available only in U160, F4, iClock260)
5th column 0 – use password
1 – use fingerprint
6th column work code (available only in U160)
I think this is a fix output of a time attendance device where i think columns has a fixed width - fields are aligned with spaces between each field.
What i need to do is to transfer three primary data to my database table
1st Column = Employee ID
2nd Column (Date&Time) = Attendance Record
4th Column = Transaction type if its a Time In or Out.
Does anyone here had a similar experience with this?