Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a barcode scanner that insert the barcode in any text field activated. I want to put this barcode into database, I tried so many events but all of them fire after reading first char only from barcode. So i though of using array with a fixed length and insert the chars into it but I don't know which event to use. Can you help me?

The scanner is very easy to use you just click the button and the barcode will appear on
word file, excel sheet even if you were renaming your file or your folder will appear in name field.

I used these events (textchanged, keypress, keyup)

I want to insert barcode into database without clicking any button in the form. Just reading the string and insert.
I don't want any code just hints.

Thanks in advance.
Posted
Updated 14-Apr-11 0:31am
v3

As you can see here:
http://www.racoindustries.com/motorola-ds4208-features.htm[^] - the scanner supports OPOS. So I would recommend using the OPOS API[^]

In my experience it's simple and reliable :)

Regards
Espen Harlinn
 
Share this answer
 
Comments
Mohammed Ahmed Gouda 15-Apr-11 12:56pm    
thx a lot
Sergey Alexandrovich Kryukov 19-Apr-11 2:40am    
Great response, my 5.
--SA
Espen Harlinn 19-Apr-11 14:56pm    
Thank you, SAKryukov!
Most barcode scanners I know of can be configured to send a special character (e.g. a line break CRLF) after reading a barcode. You could use any event (textchanged, keypress) and then check if that character was received. This should allow you to send the text to the database after the string was completely entered into the textbox.
 
Share this answer
 
Comments
Mohammed Ahmed Gouda 14-Apr-11 6:37am    
how can i configure it using code or it is within its configuration
BobJanova 14-Apr-11 7:22am    
It will probably be an option in the scanner's driver or a configuration file, if it does not send something (an Enter probably) by default.
JF2015 14-Apr-11 8:23am    
Normally you get a small booklet with the scanner where you can scan some codes that define the behaviour of the scanner.
a1mimo 14-Apr-11 7:32am    
My vote of 4

because its almost perfect

why almost?
because its not going to work for all the barcode scanners
but its still a great answer keep the good work :-)
Mohammed Ahmed Gouda 14-Apr-11 8:02am    
scanner is motorola ds4208

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