hey guys, I already have a database that can add a person with the RFID card number,
I just want a little help of you guys if how can I code the rfid and when I tap the card, the RFID# of that person will be there together with the name, time and department of that person.?

Example if tag name is 00123456 (Thats my rfid card# saved to my database) if I tap the card to the RFID reader, the FORM should show that this TAG belongs to me showing my details)

Please help me, I'm doing this for almost a month so I decided to get some advise now from you guys. I only have 2 weeks left for my defense. :/ Thank you for your help. (If you can create a system that will be much better. )

Imports System
Imports System.Data
Imports System.ComponentModel
Imports System.Threading
Imports System.IO.Ports
Imports System.Data.SqlClient

Public Class sample
    Dim received As String = Nothing
    Dim s As String
    Dim d As SetReceivedText
    Delegate Sub SetReceivedText(ByVal ReceivedData As String)

    Private Sub sample_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        d = New SetReceivedText(AddressOf ResetText)
        For Each s In System.IO.Ports.SerialPort.GetPortNames()
            lstPorts.Items.Add(s)
        Next s
    End Sub
    Protected Overrides ReadOnly Property CreateParams() As CreateParams
        Get
            Dim param As CreateParams = MyBase.CreateParams
            param.ClassStyle = param.ClassStyle Or &H200
            Return param
        End Get
    End Property

    Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
        ResetText(SerialPort1.ReadExisting())
    End Sub

    Private Sub ResetText(v As String)
        Throw New NotImplementedException()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click
        If lstPorts.SelectedIndex = -1 Then
            MsgBox("Please select a port")
            Exit Sub
        Else
            SerialPort1.BaudRate = 9600
            SerialPort1.DataBits = 8
            SerialPort1.Parity = IO.Ports.Parity.None
            SerialPort1.StopBits = IO.Ports.StopBits.One
            'SerialPort1.ReadTimeout = 300000000
            'SerialPort1.ReceivedBytesThreshold = 1
            SerialPort1.PortName = lstPorts.SelectedItem.ToString
            SerialPort1.Open()
            status.Text = "Connected"
            status.BackColor = Color.Green
            lstPorts.Enabled = False
            btnConnect.Enabled = False
            btnDisconnect.Enabled = True
        End If
    End Sub

    Private Sub btnDisconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisconnect.Click
        SerialPort1.Close()
        status.Text = "Disconnected"
        status.BackColor = Color.Gray
        lstPorts.Enabled = True
        btnConnect.Enabled = True
        btnDisconnect.Enabled = False
    End Sub

    Private Sub Timer2_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        txtTime.Text = TimeOfDay
        txtDate.Text = Date.Today
    End Sub

This code is just for showing my rfid card# (without my details).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.