Click here to Skip to main content
14,878,669 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i read barcode using scanning device in a textbox in c#.net..
I should write code such that the scanned barcode should read in a textbox and save to database.
Scanner is reading the data as i place the cursor focus in the textbox but
not properly i.e it not reading full length or some times it is reading both the barcodes in single textbox while scannig fastly.

How can the single barcode read properly and save. Are there any tracking techniques or how can it identify that single barcode is completed scannig as they are scanning fastly.

Any one please help me..
Thank you
Posted

At a guess - without see the scanner documentation it can only be that - the scanner is giving you the barcode as keyboard input. This is normal, but it will also give you a character or keycode which indicates "end of read" - look in the documents and find out what that is...
   
You indicate that scanner is reading fast, and that it is sending data as soon as you put focus on textbox. Although you do not mention the Barcode Reader model, it sounds like a fixed mount scanner setup in the "continuous read" mode. If this is the case, then you will need to config the reader to possibly change trigger mode as well as define some termination char(s) in the reader that your app can then check that the complete barcode is read. Having more details on the Barcode Reader model would help (model and USB/serial type).
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900