Data collection storage options

W

Wapiti

Tough decision for me. I'm faced with the need for RAD - short timeline.
I'm replacing an existing handheld app I wrote several years ago for an
intermec device using vc1.5 with a newer one written for ppc devices (vb.net
cf).

My question pertains to what file types to use when storing and manipulating
the data on the pda. My old app stored data using random access text
files - but it was a bit combersome to develop. I do like sql.

The specific ppc devices are yet to be known, but I need to continue
development regardless. The app may need to be ported to other ppc devices
too (just a side not if its even important at this point).

I'm trying to figure out how I should best store and work with the data
files (inventory, issues, receipts, transfers) on the pda: Text files, sql
ce, other?

A parts file will be downloaded (in flat ascii text format) to be used on
the pda (user enters a part number, the system will look up the part and
display the uom and location) - and this file could be relatively large
(several thousand parts possible).

My old program retrieves this parts file, via zmodem comm transfer, and
immediately parses it into a random access text file (then discarding the
original server fed file). When the user enters data (inventory, issues,
etc), it is stored in its respective random access file (inv.dat,
issues.dat, etc). When the user wanted to upload their collection info,
the system would export the data to a flat file and send it, zmodem, to the
PC. To build the flat file, the system would read each .dat file in turn
and write a record to text file containing all transactions - preceded by a
record flag (I=Issues, N=iNventory, etc).

The legacy server system cares less how the pda will work with the data when
its out in the field, but it does require that it accept the parts.txt file
as is, and it requires that the file received from the pda (collect.txt) is
in the same spec'd format.

Is the 'sqlserver for ce' method the best way to go? Or are random text
files handled pretty well (easy to develope and quick to access) under
vb.net cf?

Any helpful input and or experiences shared would be appreciated,

Thanks,

Mike
 
P

Paul Yao

I notice that you did not get an answer to this question (all the newsgroups
seem to shutdown on Friday afternoon! <grin>)

It is not clear to me which of the two approaches is the better one to take,
but here are some of my thoughts:

Approach 1 -- Continue using random access files. Since you are working
with a short timeline, this makes the most sense to me (given what you have
said). Random access is pretty good with the .NET Compact Framework. You've
already written the code once -- if it is C or C++, can you put that code
into a DLL and make calls to it from your managed code? If it was written in
eVB, then you should be able to translate the code to C# and keep most if
not all of it intact. It was built, tested, and was put into production. If
you really have a short time line, that makes the most sense.

The one problem with this approach, of course, is that you do not get to do
any fun, new things. But maybe you should postpone that until version 2.
After all, when you get your project done early and under budget, you win
points with your boss / client, and they may give you the freedom next time
to add the fun new Sql CE stuff in.

Approach 2 -- Port data handling to Sql CE. If I were your boss, I would ask
you to do this after you have all the rest of the app done *and* what you
have done is under budget and early. It is, in short, your "reward" for
getting everything else done (or working the weekends that you needed to get
this done).

But seriously, I would port it to Sql CE if there were some serious benefits
that you would get. The database engine itself is about a megabyte, which is
a lot on today's devices. Among the benefits you get would be a way to
synchronize your Sql CE database with a SQL Server 2000 data base using
Remote Data Access -or- Merge Replication. Since that would add something
to your existing implementation (I'm assuming), I would postpone this piece.

Hope this helps. Good luck!

--
My Best,
Paul Yao

Microsoft eMVP
co-author, .NET Compact Framework Programming with C#
co-author, .NET Compact Framework Programming with VB.NET
http://www.paulyao.com
 
W

Wapiti

Thanks Paul,

I started looking at the use of random files, and unless I'm missing
something, its not supported in the compact framework? FileOpen / Freefile

I'm looking at StreamWriter - but it seems to only support flat text files.
But someplace somewhere I had seen a Seek - was that for StreamWriter?
I've done too much research and my brain must be bugging out.

Does anyone know of any reference to using StreamWriter for open, read,
write, insert, and update operations. Doubt if delete is available.

Mike
 
T

tcarvin

Mike,

Yeah, Streams and Random Access are not really on speaking terms. You can
set positions on the stream to jump around, but it kills performance because
the stream is designed to buffer data to avoid a lot of File I/O.

On a related note, here is a link to a RAD tools for Data Collection. It
targets devices from Intermec and Symbol (both text-vased and graphical) with
the same tool. It's designed for "low impact" coding (CASE type stuff) so
it easy to accomplish standard data-collection stuff. If you are looking for
a lot of fancy stuff (animated bitmaps or whatever) then stick with .NET CF
(though it does support .NET assembly calls if lower-level work needs to be
done).

http://www.sentinelbusinesssolutions.com/products/software/CaseGold.html

Best of luck!
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top