Bar code reader component

Hello Experts.
We want to develop application that needs to be interfaced with Bar code reader, to read bar code in store products information in a database.

1. I didn't started this application, so that I want to know is there any special components in Delphi that is used with bar code readers, and what type of it's Interface, is it serial or like card reader connected with Keyboard.

2. Is there any advisable bar code reader device that easy to program? or programming has no thing to do with device type.

Thanks in Advance

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

  a barcode reader contains its own software to generate the character-equivalent of the barcode read as though the characters contained in the barcode were typed by a human user on a keyboard.

  You can get a keyboard wedge type, or some types allow you to input via a serial port.

  In either case, you scan the code, the characters are "keyed" into the device you're reading (keyboard, serial port, wherever...)

  No need for components at all!


MotazAuthor Commented:
Is that mean I can start programming, and when I get the bar code reader, just I have to plug it, install it's driver and software, then it needs only focused edit box to input bar code from products in my edit box?

MotazAuthor Commented:
and What about the types of Bar code readers?

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

I've been working with some bar code readers for a while, usig models from Metrologic. Basically i've used three models, two with serial interface and one with keyboard interface. In all of them the configuration of the Bar code reader is made directly to the Reader and there is no need to install special software or drivers, just plug them in and they start working. The Keyboard type, just sends the input to the keyboard buffer so it´s not necesary to make any special programing for this, the serial type however, sends the input to the serial port so you must program the code to scan the serial port at some time intervals (there are components that do this, but i don´t remember the name of any of them, search in for some of them) and do what ever you want with the data you received. I usually send this data to the Keyboard buffer so i don´t have to mind what kind of barcode scanner is installed, and it behaves exactly like a Keyboard type Bar code reader. To do this, I use a very usefull DLL named "PushKeys.dll" you can find it in:

Hope this helps you.
Hi Motaz,

  I've also worked with some Metrologic barcode readers. The model I used was working with an RS232 cable. You plug the serial cable in one of your COM port, set a terminal program with correct settings (often 9600 bauds, and so and so) and your set. If you want direct control of your barcode reader without the use of external driver, a simple access to your COM port in Delphi can make you happy :). No need for edit box.

  But, you might prefer other solutions?

// Connect to FPortName --> '\\.\COM1'

  FHandle := CreateFile( pchar(FPortName),
                         GENERIC_READ or GENERIC_WRITE,
                         0, // Not shared
                         nil, // No security attributes
                         0 // No template
                        ) ;

I don't have the code where I am but tell me if you need more help with this. The barcode scanned is sent in ASCII directly to you by the reader. You can tell the barcode reader to send a starting and ending character to help you extract the code from the string.


Anyway, hope it helps!
Have a nice day Motaz! ;)

   You got it. Nothing more required. There isn't even an "install the driver and software" step - it's just like having a second keyboard in parallel with the first (if you use a "keyboard wedge" type.)

   I'm certain that some types will require some simple driver - somehow it's expected. There are some that you can program to decode only some barcode types, but that's probably too fancy for your needs - and it's a hardware configuration consideration, nothing to do with your software.

   What do you mean by "types"? Do you mean "Brand" or physical configuration (wand, gun, benchtop) or are you concerned about the various barcode types in use?

   If you're dealing with product codes (as found on most items for sale at supermarkets) then you will find that there are three standards, (EAN-8/UPC-E) which is the 8-digit standard, UPC-A, which is the 12-digit standard, and EAN-13, which is the 13-digit standard. If this is what you are using, then simply fill the code read with leading zeroes to the 13-digit length.

  If you're using ITF-14 (carton outer) then you'll get a 14-digit code. You would find ITF-14s at supermarkets - on the big outer wrappers, the barcode surrounded by a heavy-printed box.

   If you are after some other internationally-defined code, such as SSCC or EAN-128, then decoding is another matter - somewhat complex in some cases.

   If you are looking for some internal application, such as asset-tracking then the format is what you choose.

   In all, don't worry about the exact barcode "font" in use - it's the barcode-reader's job to do that. Your application can assume that the reader will simply input the sequence of characters defined in the code sample to whatever port it's attached to - serial, parallel or keyboard - and  no special measures need to be taken on your part. It's the job of the barcode-reader to decode whatever barcode type is presented to a character-string, and the job of its driver to present that string as though it was coming from the keyboard.




Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MotazAuthor Commented:
I'll post points to all commenters
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.