SQL Server CE vs. DataTable

G

Guest

Is there any benefit of using SQL Server CE for data storage rather than
simply using a dataset? I'm simply getting some data from a SQL Server and
will be using this data to verify data that will be scanned with the wireless
scanner. I'm thinking that since I do not care if the data is lost if the
program is terminated, then I do not need to keep it in SQL Server CE and can
easily use a dataset. Is this an OK way of doing this?
 
G

Ginny Caughey [MVP]

If you truly don't care if you lose the data if your app ends or the device
gets reset, then there's no need to store it elsewhere, but are you really,
really sure you don't care?

Ginny Caughey
..NET Compact Framework MVP
 
S

Shloma Baum

Ginny,

I'm new to the CF, however I'm also wondring if I should go with SQL Mobile
or DataTable, but about what you mention isn't there a way to raise an event
that when when the machine for instance gets to a specific percent of
battary usage it should save the dataset to disk?, and the same when you do
a reset?

Thanks in advance
Shloma
 
G

Ginny Caughey [MVP]

Shloma,

The notification you want is part of Windows Mobile 5.0, but it isn't
available before that. When the OS wants to close your app, it sends a
WM_CLOSE message, you can put some code in your OnClosing event handler. But
honestly, if you really care about saving your data, I'd recommend writing
it out to persistent storage as it's collected. If you have a lot of data,
then SQL Mobile is a great choice. If you only have a little and you're just
adding records and not changing them, you can add them to a file in a custom
format perhaps based on CSV.
 

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