YOUR FEEDBACK
AJAX: XMLHttpRequest Vs. iFrames
Kenneth wrote: You forgot to mention a disadvantage of xmlHttpRequest that i...
AJAXWorld RIA Conference
$300 Savings Expire July 25
Register Today and SAVE!


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
POWERBUILDER LINKS YOU MUST CLICK ON


A Real-Time Physical Inventory Solution Using PocketBuilder, ASA, and a Wi-Fi Connection
A case study: A physical inventory count is necessary to reconcile the quantity on hand stored in a database

Digg This!

Page 1 of 2   next page »

Why do a physical inventory? A physical inventory count is necessary to reconcile the quantity on hand stored in a database versus what is really on the shelf. In a retail environment, this process is typically done once a year. In a perfect world, these values would always be in sync.

The value would be decremented when items are sold and incremented when items are received. Unfortunately, this is not always the case. Consider shrinkage, shoplifting, and, my personal favorite, software bugs.

Through a case study, this article will show how easy it is to architect a wireless real-time PocketBuilder application to replace a hardware-based data collection device used for physical inventory updates to an enterprise database. Specifically, a Symbol PPT8800 Pocket PC will be compared and contrasted to an American Micro M5000 Laser barcode scanner. We will show how the Pocket PC can be programmed to do real-time inventory updates as opposed to the batch upload necessary for the hardware-based device.

After reading this article you will be able to:

  • Access an ASA database wirelessly from a Pocket PC
  • Use PocketBuilder to develop a real-time physical inventory application
  • Extend the enterprise by developing other great mobile applications
What you will need:
  • A Symbol Pocket PC with 802.11b capabilities; the PPT8800 is used in this example.
  • A wireless router or access point; the Linksys WRT54G is used in this example.
  • A version of ASA that allows you to connect directly to a specified I.P. address and port; version 9.01 build 1873 is used in this example.
  • A database that has a table with a SKU and an on-hand quantity to update.
  • PocketBuilder version 1.5x or higher.
  • Some barcodes to scan.
The Batch Upload Method
The M5000 is a device for doing physical inventory (see Figure 1). It scans bar codes writing to an ASCII text file that is uploaded to the user's PC via a serial connection. That file must then be parsed and used to update your inventory table. A look-ahead algorithm is used. The layout of an entry can be either a SKU or a SKU followed by a quantity. Its format is shown below (parsing is messy!).

9780131103627
9781565923249
5

There are several disadvantages to using this device and method:

  • There is latency from the time the information is captured to the time the database is updated. Changes may have occurred before the update is applied. This may result in an incorrect inventory count.
  • The M5000 is a dumb device. It's only used to capture bar codes and quantities to an ASCII text file. Additional programming is required to update the target database. Moreover, since there is no way to connect to the user's database, real-time updates cannot be done.
  • It cannot be used to write other data-driven mobile applications.
The Real-Time Method
Contrasted to the M5000, the Symbol PPT8800 is a multi-functional device (see Figure 2). It can be used for several purposes, one of which is performing a physical inventory. There are several clear advantages to using this device and method:
  • Since it is possible to have a real-time data connection to our database, there is no latency between the time data is captured and the time the database is updated.
  • Contrasted to the M5000, the PDA is a multi-functional device. We are only limited by our imagination with respect to the number and type of data-driven applications we can write.
That being said, we will go step by step to show how we can easily architect our own physical inventory application using PocketBuilder.

Step 1: Connect your Pocket PC to an existing wireless network
On the Symbol PPT8800, this can be done by selecting the icon in the lower right-hand corner of the home screen. Choose Find WLANs. A list will appear with all the available selections. Highlight your wireless network and tap connect. Two horizontal arrows, each facing the opposite direction, should appear indicating that you are now connected.

Step 2: Start a network server on the computer where the database resides (see Figure 3)

c:\blwin32\database>dbsrv9 -n blwserver blwmed.db

Step 3: Find out the IP address of the database server


C:\blwin32\Database>ipconfig
Windows IP Configuration
Ethernet adapter Local Area
Connection 2:
Connection-specific DNS
Suffix . :
IP Address. . . . . . . . . . . . : 192.168.120.111
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.120.1
Step 4: Create a file DSN
Windows CE does not provide an ODBC Administrator. Rather, ASA uses ODBC data sources stored in ANSI format files. The file has the same name as the data source, with the extension .dsn, and is usually stored at the root level of the device. You can create the file on your PC and then use Active-Sync to transfer it to your device.

An Example File DSN

[ODBC]
uid=dba
pwd=sql
enginename=blwserver
CommLinks=TCPIP(dobroadcast=DIRECT;
HOST=192.168.120.111;port=2638)
databasename=blwmed
driver=dbodbc9.dll


Page 1 of 2   next page »

About Deanne M. Chance
Ms. Chance graduated in 1996 with a degree in computer science from the University of Illinois. She has been a frequent contributor to the PowerBuilder Developer's Journal and gave a key presentation at Sybase TechWave 2005 entitled "A Real-Time Physical Inventory Solution Using PocketBuilder ASA and a WiFi Connection." She has held several engineering positions, starting a career at Motorola where she focused on mobile I.P. by doing real-time embedded programming for the base radio controller group as part of the iDEN/Nextel project.

SYS-CON Australia News Desk wrote: Why do a physical inventory? A physical inventory count is necessary to reconcile the quantity on hand stored in a database versus what is really on the shelf. In a retail environment, this process is typically done once a year. In a perfect world, these values would always be in sync.
read & respond »
Chance wrote: Pardon me I meant to say PocketBuilder, not Powerbuilder!
read & respond »
Chance wrote: One other note, I make a reference to using the DeviceHandle() method to get an instance handle to the barcode object. Although this is valid for version 1.5x in later versions of Powerbuilder it has been changed to the read only property DeviceHandle
read & respond »
Chance wrote: Hi this is Chance. I noticed the author of this article is Ch Chance. This is somewhat amusing as I use to suffer from a serious stuttering problem. However, no more. So, I was wondering could you change that to Written by: Chance Thanks!!!!!
read & respond »
PBDJ LATEST STORIES . . .
Adobe's Kevin Lynch and Microsoft's Scott Guthrie to Keynote AJAX World RIA Conference & Expo
Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted to be
PowerBuilder and EAServer: Uniting the .NET and J2EE Communities
In PowerBuilder 11.2, .NET meets J2EE head-on with the capability to deploy .NET Windows Forms and Web Forms applications (as well as assemblies and Web Services) that access Enterprise JavaBeans (EJBs) in Sybase's own EAServer. As you'll see over the course of this article, integratin
HarPB Tool Review
HarPB is a specialized utility for checking PowerBuilder source objects in and out of AllFusion Harvest. It handles the special requirements of checking objects out to PowerBuilder Libraries (PBLs) and checking objects in from PBLs. These operations are non-standard to most source cont
PowerBuilder Editorial: The State of the State
Back in 2002, Sybase announced their four-phase approach toward adding .NET support to PowerBuilder. Phase 1 was the implementation of web services in PB9 and Phase 2 was the release of DataWindow.NET, which was packaged with PB 10. Phases 3 and 4 were the more significant phases. In P
PowerBuilder History - When Did Sybase Develop PB and How Did It Evolve?
I have been asked many times by various clients, students, and the IT curious about PowerBuilder: When did Sybase develop the product and how did it evolve? I keep telling this story and answering e-mails on the subject. I am now to the point where I have decided that I should have PBD
PowerBuilder 11's .NET Interoperability
PowerBuilder 11 deploys entire applications as .NET Windows Form or Web Form applications and deploys individual components as .NET Assemblies and as .NET Web Services. Version 11 consumes resources of the default .NET framework as well as resources of custom developer-defined .NET res
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING POWERBUILDER / SYBASE NEWS
Sybase Reports Record Second Quarter Results, Driven by 15% Revenue Growth
Sybase, Inc. (NYSE:SY), the largest enterprise software and services company exclusively