PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

databases

i'm working on a .netcf app in dev studio 2003 and i need a decent amount of database retrieval. not very frequent as i'll store the small data in memory and then save it every so often but haven't looked at anything database related for pocketpcs. does anyone have any good starting points. do most people just manipulate filse instead of using a database?
It depends what you want to do with it afterwards and what the content is. If you just want to store data and you don't care about the niceties of a database, then just look at serialisation. If you need the relational access or integrity (primary keys, etc) or open access for other applications, then look at something like Sybase's UltraLite database to run on the PocketPC (pretty sure that has a .NET i/face).

Manipulating files is ghastly and I'd advise strongly against doing it.
refractor wrote:It depends what you want to do with it afterwards and what the content is. If you just want to store data and you don't care about the niceties of a database, then just look at serialisation. If you need the relational access or integrity (primary keys, etc) or open access for other applications, then look at something like Sybase's UltraLite database to run on the PocketPC (pretty sure that has a .NET i/face).

Manipulating files is ghastly and I'd advise strongly against doing it.


i've got way too many changes to do it through files but figured maybe people could get away with little .ini files or maybe some xml formatted file to save settings in. i'll take a look and hopefully something free or lost cost. i'll get familiar with seralization. thanks for the tips. still willing to hear more ideas if anyone else wants to post :)
joshbu [MSFT] · 23 Jun 2005, 21:56 UTC
Windows CE has database(s) built in. There's the older style CEDB database that was used in everything up to PPC/SP '05 that was used to store contacts and such.

The newer devices feature EDB, which is based on SQL CE.

Finally, there's the full-blown SQL/CE which has extended features beyond what's in EDB.

A good place to start: http://msdn.microsoft.com/library/defau ... nce340.asp
There are also freeware ones. I've tried SQLite and for what I was doing it performed slightly faster than SQL Server CE and only has a 300kb footprint as opposed to a few MB with SQL CE, and the database files are significantly smaller too. You have to mess around a bit to get it working under .net, but someone has written a wrapper for the C++ dll so it can be used very similar to normal .net data access components. SQL CE is very easy to get working in development especially in .net. I would start with it and once your app is built look at other alternatives if required. However, might be a good idea from the start to not access it directly - write a few helper classes for e.g. Connection, Recordset etc that you can use to communicate with db rather than directly accessing the SQLClient.xxxx etc - will allow you later to switch to another db type without changing all your code. Good luck.