How to Read Bar Codes in Oracle Forms

How to read Bar Codes written on the product?  How to read bar codes in oracle forms for information of the product?

---

Using Symbol Technologies bar code readers (or another manufacturer) you can enter bar code info to Oracle Database. The bar code reader can be installed to keyboard connector. As a user interface you can use Developer 2000/Forms, Pro*C etc. You have may options for end user interface.

Then you can print bar code data from Oracle Reports or from Pro*C if you install bar code fonts to your operating system (W'95. 2000, XP whatever). Then change the bar code data in Reports to bar code font.
 

Here are two possible scenarios:

1. You need to walk around a large area, scan in a number of items and then dump this information into a database.

For this application it is recommended you get a scanner with memory so that the items are stored within the scanner . This information can then be dumped into an ascii flat file loaded directly into the
database via SQL*Loader or some other application.

2. Items are brought to the scanner and scanned in. A description of each item is displayed on the screen and the user is given the option to delete, modify, or commit the data to the database.

This is the type of scanning operation that most of us are familiar with as this is the typical supermarket check out scanning. The easiest way to implement this within Oracle Developer Forms is to purchase a scanner that will fit "between'" the computer and the keyboard and allow input from both devices.

Say, for example you are just going to scan in codes and you want to validate the code (see it's translation )before you enter the data into the db. One simple approach is to create a form with one block and two items:

SCANNED_ITEM - A form base table table item corresponding to an inventory table which will contain your scanned codes

TRANSLATE - A description of the item in a db table called LOOK_UP_ITEM which contains valid codes and descriptions.

The table structure for table LOOK_UP_ITEM could be as follows;

NAME CONTENTS
SCANNED_CODE CONTAINS VALID SCANNED IN CODES
DESCRIPTION CONTAINS A DESCRIPTION OF THE ITEM

Then create a key-next-item trigger on SCANNED_ITEM with code similar to the following:

CODE

DECLARE
 CURSOR GET_CODE (S_ITEM) IS
             SELECT DESCRIPTION
                FROM LOOK_UP_ITEM
             WHERE SCANNED_CODE=S_ITEM;
BEGIN
 OPEN GET_CODE(:SCANNED_ITEM);
 FETCH GET_CODE INTO :TRANSLATE;
 IF GET_CODE%NOTFOUND THEN
     message('CODE IS INVALID, PLEASE RE-ENTER');
     clear_item;
     CLOSE GET_CODE
     raise form_trigger_failure;
 ELSE
     create_record;
     CLOSE GET_CODE;
 END IF;
END;

In order to cause the key-next-item to execute you will need to ensure the bar code reader sends a TAB key sequence at the end of each scan so that the key-next-item trigger will fire.

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.