wala kasing nangyayari pag naglalagay ako ng number dun sa textbox ng RFID.. ang gusto ko sana palabasin ung mga info dun sa designated textbox. kahit di na po ako gagamit ng reader itype lang po sana namin ung RFID Number.
ayan po code ko sa ibaba.. thanks po sa tutulong
Imports System.Data.OleDb
Public Class Form2
Dim con As New OleDbConnection
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
con.ConnectionString = "provider= microsoft.jet.oledb.4.0; data source = C:\Users\Admin\Documents\Databaseko.accdb"
con.Open()
End Sub
Private Sub showitems()
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("Select * FROM Accounts WHERE RFID like '%" & txtRfid.Text & "%'", con)
da.Fill(dt)
txtCompany.Text = dt.Rows("RFID").Item(1)
txtAddress.Text = dt.Rows("RFID").Item(2)
txtCperson.Text = dt.Rows("RFID").Item(3)
txtCnumber.Text = dt.Rows("RFID").Item(4)
txtVuntil.Text = dt.Rows("RFID").Item(5)
End Sub
ayan po code ko sa ibaba.. thanks po sa tutulong
Imports System.Data.OleDb
Public Class Form2
Dim con As New OleDbConnection
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
con.ConnectionString = "provider= microsoft.jet.oledb.4.0; data source = C:\Users\Admin\Documents\Databaseko.accdb"
con.Open()
End Sub
Private Sub showitems()
Dim ds As New DataSet
Dim dt As New DataTable
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("Select * FROM Accounts WHERE RFID like '%" & txtRfid.Text & "%'", con)
da.Fill(dt)
txtCompany.Text = dt.Rows("RFID").Item(1)
txtAddress.Text = dt.Rows("RFID").Item(2)
txtCperson.Text = dt.Rows("RFID").Item(3)
txtCnumber.Text = dt.Rows("RFID").Item(4)
txtVuntil.Text = dt.Rows("RFID").Item(5)
End Sub