Example: Setup DSN Less  Connection – O2001SSW to Oracle XE

 

Step 1. Prepare Oracle table and user with limited privileges.

 

create user opn2001ins identified by opnpass;

 

grant connect, resource to opn2001ins;

 

connect opn2001ins/opnpass;

 

create table barcodelog

(

Barcode varchar2(50) not null,

ScannerID varchar2(24),

BarcodeType varchar2(24),

ScannerTStamp Date,

LogTime Date,

BarcodeCount NUmber(4)

);

Warning: user with limited privileges or only insert privilege on barcodelog table is strongly advised!

Modify above SQL statements according to your database/security administrator recommendation.

Step 2. Setting up Oracle ODBC DSN-Less connection.

DSN-Less connection does not require invoking ODBC manager. Connection descriptor can be entered directly in O2001SSW configuration dialog.

Click on ‘configure log to database’ button.

Enter following value in Connection Descriptor field:

Driver={Oracle in XE};Dbq=XE;Uid=opn2001ins;Pwd=opnpass;

Enter SQL insert template in the Insert SQL field:

Insert into barcodelog(Barcode,ScannerID,BarcodeType,ScannerTStamp,LogTime,BarcodeCount) values (?,?,?,?,?,?)

Note: question marks are placeholders for format – field selection variables which will be replaced by actual values read from OPN2001 scanner when SQL insert statement is executed.

Enter exact number of format variables as number of question marks in Format Field Selection:

{Barcode}, {ScannerID}, {BarcodeType}, {ScannerRTC}, {SysTime}, {BarcodeCount}

imageImage: O2001SSW odbc to setup – save barcodes from OPN2001 memory to Oracle Database.

Click ‘Test Now’ button to verify setup.

Available values for format:

{Barcode}

Barcode stored in OPN-2001 memory

{ScannerID}

Unique scanner ID (set by manufacturer)

{BarcodeType}

Barcode type (EAN13, UPC, EAN128 …)

{ScannerRTC}

Scan time - Scanner real time clock (If enabled)

{SysTime}

System – computer time

{BarcodeCount}

Total number of barcodes in scanner memory

{SessionCounter}

Total number of barcodes read from scanner since program was started

 

Visit:  http://www.connectionstrings.com/oracle  for more connection string examples.