Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-2008, 01:17 PM
JamesN JamesN is offline
Newbie
 
Join Date: Jan 2008
Posts: 4
Rep Power: 0
JamesN is on a distinguished road
Unhappy How to get barcode reader to search Access Database

Hi,

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-31-2008, 03:50 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,203
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

All of the readers I have used simply scan and print the text wherever the cursor is. Your reader may be different but open notepad and scan something. Does the scanned text appear?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-31-2008, 04:04 PM
Xantara's Avatar   
Xantara Xantara is offline
Newbie
 
Join Date: Jan 2008
Location: Pennsylvania
Posts: 22
Rep Power: 3
Xantara is on a distinguished road
Default

i'm confused...your title states "search access"....so..

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
__________________
Xantara...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-31-2008, 04:59 PM
JamesN JamesN is offline
Newbie
 
Join Date: Jan 2008
Posts: 4
Rep Power: 0
JamesN is on a distinguished road
Default

Hi,

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..
Thanks,
James
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-31-2008, 09:19 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,203
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

Yes, that is clear. You don't need an API but you will need to code a timer and onChange event for your text box (or whatever the barcode will scan into). I suggest a timer because that is how I've done it in the past, there may be better methods. When the textbox changes (text is entered) start the timer. In three seconds execute your search function (I suggest three seconds because any sooner in my tests caused an incomplete fill from the scanner). What code do you have so far?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 02-01-2008, 04:29 PM
JamesN JamesN is offline
Newbie
 
Join Date: Jan 2008
Posts: 4
Rep Power: 0
JamesN is on a distinguished road
Default

Hi,

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:
Code:
 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.

Thanks.
James

Last edited by TcM; 02-01-2008 at 06:56 PM. Reason: Code Tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-01-2008, 08:03 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,203
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

I created a barcode scanner for an LXE device running Windows Mobile 5.0 and this was the best (quickest) method I could come up with (using a timer). It works great still. Basically, just take everything you have in your textChanged function now and replace it with timer.start. Once your timer reaches 3 seconds execute what you have now.

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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-02-2008, 08:10 AM
JamesN JamesN is offline
Newbie
 
Join Date: Jan 2008
Posts: 4
Rep Power: 0
JamesN is on a distinguished road
Default

Hi,
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
Call Timer2_Tick()
End Sub

This is not working?

I would be very grateful if you could send me on that c# code..

Thanks,
James
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-02-2008, 10:33 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,203
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default

You should be enabling Timer2 instead of calling the Tick function. Once the timer count-down is complete it will execute the tick function. Can you post more of your code? Or attach the source here?b

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)?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding Access database to C# project cowdog88 C# Programming 1 09-17-2007 04:12 PM
Retrieving Access Database tigger Visual Basic Programming 0 07-06-2007 01:27 AM
Access database query using sql help !!! ORACLE Visual Basic Programming 4 04-16-2007 02:12 PM
Database access jimmyfrube Visual Basic Programming 1 04-03-2007 04:57 PM
Simple MySQL Database Search Jaan PHP Tutorials 1 01-01-2007 11:15 AM


All times are GMT -5. The time now is 06:33 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads