Any of the current SDK's ship with example code for accessing the databases. I think the dbview project is in the PocketPC SDK for sure. Probably doesn't show how to write to the database, but you'll at least see which API's are involved, and then it's just documentation reading time.
Actually, wait a minute... Oh yeah! Go to . I forgot about that! There is a sample I wrote a long time ago that should get you up to speed. I can't promise it will give you everything you need, or that it's completely bug-free, but it should be an excellent starting point.