Hello..
I'm a beginner in C#.Net programming.
I'm working on RFID related project.
The RFID reader connected to PC serial port and I have done the terminal interface using C#.Net.
I would like to know how to compare the received ID in the serial port buffer with the ID I've saved in MS Access database?
What i'm trying to do is when the ID received, then it will be compared with a bunch of ID saved in the database, then the Richtextbox will display the details (saved in the database) of the matched ID.
Thanks ^^
Loading
Suthish NairPosted Jan 29, 2011, 5:21 AM
Good to hear you got the solution.
ville valoPosted Jan 29, 2011, 2:29 AM
sorry for being inactive for awhile..
after working for hours on my program I slowly figured it out myself lolx
it was simple actually..
just take the received data and use search operation on the database..
anyway Thanks for your help
i really appreciate it ^^
Suthish NairPosted Jan 21, 2011, 3:12 PM
So you meant to say how to pass the value to DB and compare, please correct me?
Sam HobbsPosted Jan 21, 2011, 9:40 AM
ville valoPosted Jan 21, 2011, 6:44 AM
My aim is when the tag scanned, the ID then compared to my MS Access database 1st ( the database contains ID holder name and their ID). Then if the ID matches, the name of the ID holder will be displayed on the richtextbox. If the ID didn't matches, it will display the ID instead of name on the richtextbox. My problem is to compare the ID received with the ID in the database.
Hope you're clear with my explaination and willing to help me =p
Sam HobbsPosted Jan 16, 2011, 4:12 PM
If you are familiar with Access, then a select query in Access can also exist as SQL. You can create a select query in Access and then switch to SQL view to see the SQL. It will really help people to help you if you are familiar with SQL.
knightsPosted Jan 16, 2011, 1:55 AM
Suppose your varible name is
string scannedRFID = "Some RFID which you scanned";
After that you can use ADO.Net to execute the query , get the details and process it further as per your requirements.
For an Ado.Net review, take a look at the following.I hope that will help, otherwise post it back and we will discuss further.Thanks
http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson02.aspx
ville valoPosted Jan 16, 2011, 1:37 AM
Can you explain a little bit on "run a select query returning the rest of the details against the id" ?
I really have no idea how to compare the received ID with the IDs in the database.
By now, i have accomplished reading the ID in the buffer and also open the database oledb connection on the C# application.
Thanks for your help ^^
knightsPosted Jan 14, 2011, 2:39 PM
After that you can utilize ADO.Net(if familiar) to connect to Access and run a select query returning the rest of the details against the id which you have received in the buffer and you can display the result in the rich text box.Let us know if thats sounds workable for you or else we are here to suggest you if you can provide more information.Thanks