While sqlite doesnt support customized reports generating reports is pretty 
easy,  there is a code tutorial on the website that explains it.
 
Woody

--- On Mon, 2/16/09, Shaun <[email protected]> wrote:

From: Shaun <[email protected]>
Subject: [nsbasic-ce] Re: Storing data on the ce device
To: [email protected]
Date: Monday, February 16, 2009, 8:49 PM






Brian,

Based on the fact that you have to summarize data, I'd be inclined to 
go to a RDB, either SQLite or ADOCE. It's kind of a pain to have to 
open and close several files to get that data (if you were to do it 
through flat files) as opposed to simply summing a column and 
dividing by the number of records. Also, I'm not sure if they do, 
but if either SQLite or ADOCE support customized reports, that's 
another reason to use those with your printing needs.

Again, I'm not much help when it comes to either of these, but there 
are plenty of folks around here who are. Also take a look through 
the tech notes and samples.

The only reason I use flat text files for my on-device data storage 
is the data doesn't exist for very long on there (at most a few days) 
and the data isn't manipulated at all once it's saved
(summarizing, etc). All of that happens once the data gets downloaded 
and imported into a full MySQL server in our office. Your needs are 
quite a bit different and therefore require a different strategy.

Shaun

--- In nsbasic...@yahoogro ups.com, "brianm...@. .." <brianm...@. ..> 
wrote:
>
> Shaun
> 
> Thanks for the advice. The device is part of a machine that checks 
> the weights of packs on the fly, we weigh every pack. Data is 
> collated every hour to prove the average weight of the batch is 
above 
> a certain level.Once the data is stored it will only either be 
> printed locally or be transferred to a server. I would only need to 
> look at very recent historical data normally on the device perhaps 
> the last weeks or so. The device is connected to a PLC to operate 
the 
> machine and aquire the weights etc.
> 
> My background is with PLC and not this type of device so I am 
unsure 
> if the CE device is the same as a PC, from what I can make out it 
is 
> and so I should be able to program up the unit to work. I have also 
> taken on the job with an extremely short lead time!
> 
> I think I would like to go along the file method because I am more 
> used to this with other projects.
> 
> Regards
> 
> Brian
> 
> 
> 
> --- In nsbasic...@yahoogro ups.com, "Shaun" <phill214@> wrote:
> >
> > Hey Brian,
> > 
> > Welcome to NSB.
> > 
> > Sorry I can't help much on the ADOCE side, but I can give you 
some 
> > tips on the files side.
> > 
> > The system I've built using NSB utilizes a similar setup to what 
> > you're talking about by using a key number. All I do is append 
the 
> > number to the end of the file name. The number is autogenerated, 
> but 
> > other systems I've built have used user input for the key. It's 
> > really simple and makes it easy to load/save previous records.
> > 
> > I'm not really sure what you mean by "create completes batch 
files 
> in 
> > a similar manner and use the time date function to name them 
> easily, 
> > again this is easy to do but my dilemma is with the collating 
> > or dynamic data which I cannot afford to lose for legal reasons.."
> > 
> > If you're talking about using the date/time stamp as the key 
field, 
> > I'd warn against it as that could complicate opening/editing 
older 
> > files. One thing you can do to guard against losing data is copy 
> the 
> > file you're modifying over to a backup spot (another folder, 
backup 
> > card, etc) prior to any edits to the file. If anything happens 
to 
> > the original, there's always a backup to restore from. With as 
> many 
> > data writes/deletes as my program does, I have never ran into a 
> > problem with losing files/data that wasn't my own making. ;)
> > 
> > The one big part of this that you didn't mention in your original 
> > post is what is the ultimate goal of this data? Will it reside 
on 
> a 
> > server, stay only on the CE device, etc? This could greatly 
> > influence the choice you make in your initial design. If the 
files 
> > are going to remain/grow on the CE device, I'd go with a formal 
db 
> > structure; if however the files are going to be downloaded to a 
> > central server, comma-delimited text files are REALLY easy to 
> handle.
> > 
> > Hope this helps.
> > Shaun
> > 
> > --- In nsbasic...@yahoogro ups.com, "brianmeek@" <brianmeek@> 
> > wrote:
> > >
> > > 
> > > Hi I am new to ns basic and need a little help?
> > > 
> > > I am trying to store some recipes on a system using NS Basic 
Ce 
> to 
> > > develop but I don't understand a couple of things.
> > > 
> > > If I use ADOCE and create a database the first time I run the 
> > program 
> > > is the database that is created automatically stored. If when I 
> > > restart the program say after a power down is there the 
> capability 
> > to 
> > > check if the database already exists?
> > > 
> > > I need two tables, one with 10 fields and the other with 25. 
The 
> > > first contains my recipe settings and the other collected data.
> > > 
> > > I think the system can do this but I am not familiar enough 
with 
> CE 
> > > devices.
> > > 
> > > Alternatively I can write to and read from a file but Is there 
a 
> > > limit on how many times I can do this, potentially I will be 
> doing 
> > > this about 5000 times per hour. It is not clear how to create 
the 
> > > array and then store it at a location where I can read and 
write 
> to 
> > > it.
> > > 
> > > I also thought of creating my recipes as individual text files 
> and 
> > > linking a number to each one so that I could work through them 
> and 
> > > store them on the flash disk on the unit. This way It looks 
very 
> > easy 
> > > to do and often easiest is best. I can create completes batch 
> files 
> > > in a similar manner and use the time date function to name them 
> > > easily, again this is easy to do but my dilemma is with the 
> > collating 
> > > or dynamic data which I cannot afford to lose for legal reasons.
> > > 
> > > Can you shed some light on this for me please?
> > > 
> > > Regards
> > > 
> > > Brian
> > >
> >
>















--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to