Monday, August 23, 2010

Access a local SQL Compact database from Silverlight 4

Thanks to the new COM support in Silverlight 4, it is now possible for an elevated OOB application to access a local SQL Compact database. Keep in mind that COM suppport only is available on the Windows platform, not on Mac.
And thanks to the excellent SilverlightCOM Toolkit on Codeplex, it is very easy to use the ADO COM objects from your Silverlight application in a familiar (.NET) manner. In addition to data access, the COM Toolkit also enables access to files and directories, including file contents, registry, environment and starting processes (for now).
In order to enable access to COM objects (on Windows platforms only, of course), the following properties must be set for your Silverlight 4 project (which becomes settings in the AppManifest.xaml file):
image_5F00_thumb5_5F00_thumb_5F00_42C0A776.png

Read more: Beyond Relational