Jigsaw Puzzle Website Content Packs - Add jigsaw puzzles to your website
Zethix - Yesterday, 04:20 PM
Recent Blog Entries
Recent Status Updates
- Managed C++
- Visual Basic 4 / 5 / 6
- linked list
- hello world
How to get barcode reader to search Access Database
Posted 31 January 2008 - 10:17 AM
Sorry if this is the wrong place..
I'm a beginner at vb.net and Access.
I'm using a barcode reader to scan in items, and then I want to search an access database and display the saved details on this item in the application.
I'm wondering if anyone can put me in the right direction,
What interface do I need the reader to be in: keyboard wedge/RS232?
Do I need a API to act in between the two: Reader and vb.net
Any help or advice would be great.
Posted 31 January 2008 - 12:50 PM
Posted 31 January 2008 - 01:04 PM
What exactly are you trying to do? Are you scanning something with a barcode and then putting it in an access database and you want to know how to go from the scan to the database?
If this is the case, i may be able to help you
Posted 31 January 2008 - 01:59 PM
My scanner is working, it will scan the codes into notepad.
I'm going to have the barcode numbers saved in access, so once i scan the items, vb will search for it in the database and display the details on the form.
I hope this clears up what I'm trying to do..
Posted 31 January 2008 - 06:19 PM
Posted 01 February 2008 - 01:29 PM
At the moment I'm having trouble even getting data to come back from databaase.
I'm going to set the timer 2moro, and I'll let you know how it goes, I tried it with out timer, and like you said it didnt take in all of the barcode, only first number.
This is the code I have at the moment:
Private Sub txtBarcode_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBarcode.TextChanged 'This searches the database for the required search fields objScanDA.SelectCommand = New OleDb.OleDbCommand( _ "SELECT * FROM Product WHERE Barcode = '" + txtBarcode.Text + "' ", objConnection) 'Fill the DataSet objScanDA.Fill(objDataSet, "Scan") 'Bind the text boxes TextBox1.DataBindings.Add("Text", objDataSet, _ "Scan.Size") TextBox2.DataBindings.Add("Text", objDataSet, _ "Scan.Price") End Sub
It runs, but nothing happens. I need to set the timer, and hopefully that will make a difference.
Posted 01 February 2008 - 05:03 PM
If you need help let me know. I have C# code that does a similar procedure except it uses a network file created from Oracle instead of an Access DB.
Posted 02 February 2008 - 05:10 AM
Thanks a million I got it working with the timer, But only problem is how would you go about scanning a number of items.
Can I call the timer function from a button?
Private Sub ScanNextItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ScanNextItem.Click
This is not working?
I would be very grateful if you could send me on that c# code..
Posted 02 February 2008 - 07:33 AM
It will be Monday before I can send the C# code. It is at work, also keep in mind it is for Windows Mobile 5.0 so it may look a little different. What version of Visual Basic are you using (2003/2005/2008)?