Hi Evan,
once you have installed CE on your development machine you simply reference
the installed 'System.Data.SqlServerCe.dll' assembly. When distributing you
distribute the relevant DLLs; there is no need to install as a separate
exercise on the target machine as the entire system is DLL and file-based.
However, where you don't have control of the final environment
(shrink-wrapped software), you should install using the SSCERuntime-ENU.msi
installer. There is no running service, unlike full-blown SQL or Express
edition. The files you need to distribute are in the REDIST.TXT file in the
SQL CE installation folder. Read the ReadmeSSCE35_ENU.htm in your install
folder too (assuming you are using CE3.5).
Once referenced in your application it is pretty similar to use to standard
SQL. Your class names are different, eg. SqlCeConnection rather than
SqlConnection and as I mentioned before, there are a few limitations. For
your off-line work it could be a good fit though, especially when using the
IIS functionality to provide synchronisation with SQL Server.
Check out
http://www.microsoft.com/sql/editions/compact/redistribute.mspx
for information on redistribution rights (it's free but you must register
via Windows Live to become authorised to redistribute) and the EULA.
There's also a SQL Server CE blog at
http://blogs.msdn.com/sqlservercompact/.
Also it is worth reviewing the article on choosing which version of SQL to
use between CE and Express at
http://www.microsoft.com/sql/editions/compact/sscecomparison.mspx;
--
BlackWasp
www.blackwasp.co.uk
How does one make use of SQL Server CE with a WinForms application?
I'm currently creating one that needs to have a read-only local cache
of data that users can use when offline, so from what I've read, CE
sounds like the right thing. However, I have only been able to find
some basic information about programming against it. None of the
information that I've found has discussed deploying WinForms apps that
use it.
1) Does the user need to have CE "installed" on their machine prior to
using the application?
2) How do you configure the where the offline cache gets stored
(program needs to be able to run in non-administrator mode)?