🔒 Closed Pa help po sa code vb.net

Status
Not open for further replies.

kingki

Leecher
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
 
ang code na ginamit ko para sa inaalam mo ay ganito

txtCompany.Text = (rs.Fields(0).Value)
txtAddress.Text = (rs.Fields(1).Value)
And so on

yung rs.Fields 0 - ?? ay yung nasa Database mo
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 563
    Views
  • 3
    Participants
Last reply from:
lauwelsemacio

Trending Topics

Online now

Members online
336
Guests online
836
Total visitors
1,172

Forum statistics

Threads
2,286,938
Posts
29,041,295
Members
1,217,273
Latest member
Ko11ya
Back
Top