could you clarify this further? perhaps a small detail of what you're trying to achieve will help. but as far as i know, barcode scanners do the translation for you so once a code is scanned, it act as if the characters have been entered thru keyboard. so there's really no trapping needed.
As Kilroy says above, barcode readers include a decoder which will change the bar image into an ASCII character string.
Typically the barcode reader is attached to the workstation via a keyboard "wedge" which will send the characters to the workstation in a manner similar to user keyboard entry.
In that way the application will not be able to tell the difference between manually typed characters and a barcode string. And, consequently, the application will not need to be modified to accept this string.
There are a few exceptions to this such as large volume barcode readers such as conveyor belt readers, etc. But even these readers typically automatically decode the barcodes and send an ASCII character string to the application.
Your application will merely need to have barcode cross-reference value(s) saved somewhere (such as in a table) so that the application can "convert" the ASCII character string into some other value (such as an SKU).
Thanks for the tips. What I am trying to say is "how VFP handles the data, is it a memory variable?" Appreciate if you could send a sample code on how to handle this. Thanks.
VFP handles the data as if they were typed at the keyboard.
So if you have a input routine/form running at the moment of scanning the barcode the barcode gets entered into your input routine of form.
Notihing special to it.
Rob is correct in that barcode reader data can be (and usually is) received into the application just like keyboard entry data - that is via a Textbox GET field within a Form.
Since that Textbox GET field has an associated ControlSource, that memory variable will acquire the value. Or you can assign the value to another variable within the TextBox's VALID method.
If you want your barcode reader to work in a different manner, such as un-attended automatic conveyor belt barcode reader value entry directly into a table, etc. you will need to get more creative. And probably use a different type of barcode reader.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.