Re: SQL CE basics

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Oliver,

You can just copy the sdf file, or you can create one on the fly - it's your choice. I agree that SQL CE is a good choice when you have 10000 rows to manage, and it supports access my multiple concurrent processes as long as they are all on the same machine.

Here's a good source of info for native code developers: http://nativemobile.blogspot.com/feeds/posts/default?alt=rss

Also check out Books Online: http://www.microsoft.com/sql/editions/compact/downloads.mspx

--

Ginny Caughey
Device Application Development MVP


"Oliver Schenk" <oliver.schenk@xxxxxx> wrote in message news:OIIt6vSLJHA.3808@xxxxxxxxxxxxxxxxxxxxxxx
Hi All,

I am not new to SQL and using SQL queries, however I am new to Windows CE and using SQLCE 3.5. I have so far managed to install it and I can add it to my operating system using platform builder and the component catalog.

I have read a few things in the online books but nothing really provides any clear examples with native win32 code. I'm struggling to find sources that explain:

1. Can I just copy an .sdf file to the device? Or is it .mdf? Or do I create one on the fly from my program.
2. Opening/closing a database.
3. Reading/writing queries to the database.

I tried including:

#include <sqlce_oledb.h>
#include <sqlce_err.h>

but compile complains that it cannot find sqlce_oledb.h. Not sure what I have to do to get the compiler to find the .h file.


Basically I'm just looking for a "getting started" guide for SQL CE 3.5 and native Win32 programming.

I actually intend to access the database from real-time programs, but I need around 10000 data points so someone suggested using SQL CE instead of CEDB or EDB. Does that sound suitable or not?

All I really need to store is 10000 booleans and 10000 ints, maybe I should just use an array? But the problem is it may be accessed by multiple processes at the same time...and it needs to survive a power cycle. I guess I could routinely write everything to a simple txt file.

I'm very new to Windows native so bit of a steep learning curve there. Not sure what the "preferred" way of doing things is.


Thanks

.



Relevant Pages

  • Re: How to create .SDF file programmatically on the server for MR
    ... it should be very simple to generate your *starting point* database on ... an initial state of the local database that you can use anywhere SQL Compact ... get updated periodically through merge replication. ... application to download a compressed version of the .SDF file through ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL CE basics
    ... Header files are not generally in class path so you have to explicitly add to list of include directories to look out for compiler to check. ... I am not new to SQL and using SQL queries, however I am new to Windows CE and using SQLCE 3.5. ... I have read a few things in the online books but nothing really provides any clear examples with native win32 code. ... Reading/writing queries to the database. ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL CE basics
    ... were you just refering to the database or code as well. ... Header files are not generally in class path so you have to explicitly add to list of include directories to look out for compiler to check. ... I agree that SQL CE is a good choice when you have 10000 rows to manage, and it supports access my multiple concurrent processes as long as they are all on the same machine. ... I have read a few things in the online books but nothing really provides any clear examples with native win32 code. ...
    (microsoft.public.sqlserver.ce)
  • Re: SQL CE basics
    ... I am not new to SQL and using SQL queries, however I am new to Windows CE and using SQLCE 3.5. ... I have read a few things in the online books but nothing really provides any clear examples with native win32 code. ... Reading/writing queries to the database. ... but compile complains that it cannot find sqlce_oledb.h. ...
    (microsoft.public.sqlserver.ce)
  • Re: Need Help
    ... Wowww, wowww! ... This is a desktop data provider for .NET to access SQL CE ... > João Paulo Figueira ... >> write the specific scenarios to connect to the sdf file on the ppc and ...
    (microsoft.public.sqlserver.ce)