<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5238131531249720750</atom:id><lastBuildDate>Sat, 28 Jan 2012 15:59:29 +0000</lastBuildDate><category>SQL Compact 4.0</category><category>Windows Phone</category><category>Visual Studio</category><category>SQL Server Compact Edition</category><category>PowerShell</category><category>SQL CE</category><category>SQL Mobile</category><category>Linq to SQL</category><category>Sync Framework</category><category>ASP</category><category>CodeSmith</category><category>SQL Compact 3.5</category><category>Merge Replication</category><category>Entity Framework</category><category>Silverlight</category><category>SSMS</category><category>ASP.NET</category><category>ADO.NET</category><title>Everything SQL Server Compact</title><description>This blog tries to keep up with everything SQL Compact related, including forays into subjects like Microsoft Sync Framework, Windows Phone and SQL Server Replication</description><link>http://erikej.blogspot.com/</link><managingEditor>noreply@blogger.com (ErikEJ)</managingEditor><generator>Blogger</generator><openSearch:totalResults>196</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ErikejBlogsAboutSqlCompactnetAndRelatedStuff" /><feedburner:info uri="erikejblogsaboutsqlcompactnetandrelatedstuff" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-3892215392998178696</guid><pubDate>Tue, 24 Jan 2012 14:50:00 +0000</pubDate><atom:updated>2012-01-24T15:50:49.477+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">SQL Server Compact Edition</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>Review of “Windows Phone 7.5 Data Cookbook”</title><description>&lt;p&gt;The &lt;a href="http://www.packtpub.com/windows-phone-7-5-for-storing-managing-manipulating-data-cookbook/book" target="_blank"&gt;“Windows Phone 7.5 Data Cookbook”&lt;/a&gt; is a collection of more that 30 so-called recipes&amp;#160; for working with with data in Windows Phone 7.5 applications. It covers all data related tasks from UI data binding and MVVM to using WCF Data Services. &lt;/p&gt;  &lt;p&gt;A recipe is a step-by-step walkthrough of a sample mini application, that covers the subject at hand. All the samples are available for download from the publishers web site for registered users.&lt;/p&gt;  &lt;p&gt;The book covers the following topics:    &lt;br /&gt;- Data binding, including element binding, DataContext, data templates, converters.     &lt;br /&gt;- Isolated storage     &lt;br /&gt;- Using XML files     &lt;br /&gt;- Consuming OData, and performing CRUD against OData sources     &lt;br /&gt;- Using on-device databases, including Perst, SQLite and SQL Server Compact with LINQ to SQL     &lt;br /&gt;- Consuming REST feeds, and creating a REST service     &lt;br /&gt;- WCF Data Services     &lt;br /&gt;- MVVM&lt;/p&gt;  &lt;p&gt;The hands-on approach is useful for any developer new to the Windows Phone platform, and can also be used a samples for seasoned developers in need of a quick solution to a problem.&lt;/p&gt;  &lt;p&gt;You can also download a sample chapter of the book, &lt;a href="http://www.packtpub.com/sites/default/files/1222EXP-Chapter-2-Isolated-Storage.pdf?utm_source=packtpub&amp;amp;utm_medium=free&amp;amp;utm_campaign=pdf" target="_blank"&gt;Chapter 2 – Isolated Storage&lt;/a&gt; to get a feel for the format.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.packtpub.com/sites/default/files/1222EXP-Chapter-2-Isolated-Storage.pdf?utm_source=packtpub&amp;amp;utm_medium=free&amp;amp;utm_campaign=pdf"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1222EXP_Windows%20Phone%207%20Data%20Cookbook" border="0" alt="1222EXP_Windows%20Phone%207%20Data%20Cookbook" src="http://lh3.ggpht.com/-o1tMNA5x8pA/Tx7FSGEAP9I/AAAAAAAAArA/Y1xF-r4rlO4/1222EXP_Windows20Phone20720Data20Coo.jpg?imgmax=800" width="183" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-3892215392998178696?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/CSQPfCDjBZk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/CSQPfCDjBZk/review-of-windows-phone-75-data.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-o1tMNA5x8pA/Tx7FSGEAP9I/AAAAAAAAArA/Y1xF-r4rlO4/s72-c/1222EXP_Windows20Phone20720Data20Coo.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2012/01/review-of-windows-phone-75-data.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-765466006916826870</guid><pubDate>Mon, 23 Jan 2012 14:34:00 +0000</pubDate><atom:updated>2012-01-23T15:34:59.415+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>Windows Phone Local Database tip: Initializing the database</title><description>&lt;p&gt;There are several options for initializing the database for Window Phone, depending on your approach. By “initializing” I mean preparing the database for first use, just after the application has ben installed. &lt;/p&gt;  &lt;p&gt;Whether you create the DataContext by hand or use RAD “Database First” with the SQL Server Compact Toolbox or the ExportSqlCe command line utility is not relevant. &lt;/p&gt;  &lt;p&gt;You can read more about Database First here: &lt;a title="http://erikej.blogspot.com/2012/01/generating-linq-to-sql-datacontext-with.html" href="http://erikej.blogspot.com/2012/01/generating-linq-to-sql-datacontext-with.html"&gt;http://erikej.blogspot.com/2012/01/generating-linq-to-sql-datacontext-with.html&lt;/a&gt; and more about Code First here: &lt;a title="http://msdn.microsoft.com/en-us/library/hh202876(v=VS.92).aspx" href="http://msdn.microsoft.com/en-us/library/hh202876(v=VS.92).aspx"&gt;http://msdn.microsoft.com/en-us/library/hh202876(v=VS.92).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I will assume you have used one of my tools to create the DataContext classes.&lt;/p&gt;  &lt;h2&gt;Option 1: No database file included&lt;/h2&gt;  &lt;p&gt;In this case, there is no initial data in the local database, it will be populated either by getting data from the web, or by manual entry by the user. The database must be writable, and must therefore reside in Isolated Storage. The connection string look like this: &amp;quot;Data Source=isostore:/Chinook.sdf&amp;quot;&lt;/p&gt;  &lt;p&gt;To create the database based on the definition in the DataContext classes, you can use the following code, for example for each database call, or during app start:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString))&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;if &lt;/span&gt;(!db.DatabaseExists())&lt;br /&gt;        db.CreateDatabase();&lt;br /&gt;}&lt;br /&gt;OR:&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString))&lt;br /&gt;{&lt;br /&gt;    db.CreateIfNotExists();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Option 2: Database file included, read and write&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;With this option, you include a database (.sdf file) in your project as en embedded resource:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-9wS-wbiS1oQ/Tx1wB95EXiI/AAAAAAAAAqg/XbeKLWCKAyU/s1600-h/image7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-ahgMqOeO4XE/Tx1wCuHsgjI/AAAAAAAAAqo/CSZzL8b8m2A/image_thumb3.png?imgmax=800" width="281" height="370" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You database must reside in Isolated Storage to be writable, and it must be copied to Isolated Storage as required. The connection string looks like this: &amp;quot;Data Source=isostore:/Chinook.sdf&amp;quot;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To copy the database to Isolated Storage, you can use the following code, for example for each database call, or during app start:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString))&lt;br /&gt;{&lt;br /&gt;    db.CreateIfNotExists();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;strong&gt;Option 3: Database file included, read only&lt;/strong&gt;&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;With this option, you use the database for reference data only, and it can reside in the program files folder as a read-only resource. You include the database (.sdf file) as Content in your project:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-_bbS74SH0T0/Tx1wDmP4kAI/AAAAAAAAAqs/c7N6V_Qd-DI/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-v_NWRB1_Ur8/Tx1wERhWzgI/AAAAAAAAAq4/GSHo96EOegk/image_thumb4.png?imgmax=800" width="238" height="332" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You do not need to copy the database anywhere, it is installed with the other content in your application. The connection string looks like this: &amp;quot;Data Source=appdata:/Chinook.sdf;File Mode=Read Only;&amp;quot;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To connect to the database, use the following code:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionStringReadOnly))&lt;br /&gt;{&lt;br /&gt;    db.LogDebug = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: green"&gt;// More data access here...&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;I hope this article gave you an overview over the various options for database initialization with Local Database on Windows Phone.   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-765466006916826870?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/dWtc9P9Wv-Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/dWtc9P9Wv-Y/windows-phone-local-database-tip.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-ahgMqOeO4XE/Tx1wCuHsgjI/AAAAAAAAAqo/CSZzL8b8m2A/s72-c/image_thumb3.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2012/01/windows-phone-local-database-tip.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-940036027139882448</guid><pubDate>Mon, 16 Jan 2012 11:05:00 +0000</pubDate><atom:updated>2012-01-16T13:12:29.938+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>Generating a LINQ to SQL DataContext for VS Express for Windows Phone</title><description>&lt;p&gt;As you may know, you can generate a Windows Phone DataContext based on an existing database for use with Windows Phone Mango “Local Database”, as described &lt;a href="http://erikej.blogspot.com/2011/06/sql-server-compact-toolbox-22visual.html" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://erikej.blogspot.com/2012/01/sql-server-compact-toolbox-26visual.html" target="_blank"&gt;here&lt;/a&gt;. But this feature is only available if you own a paid Visual Studio edition (Pro or higher), as the Express editions do not support add-ins.&lt;/p&gt;  &lt;p&gt;But users of Visual Studio 2010 Express for Windows Phone can now also take advantage of all the productivity benefits of the “Database First” approach to Local Database development on Windows Phone. &lt;/p&gt;  &lt;p&gt;Provided you have a SQL Server Compact Database ready, designed according to the &lt;a href="http://msdn.microsoft.com/en-us/library/hh286406(v=VS.92).aspx" target="_blank"&gt;guidelines here&lt;/a&gt;, and possibly created by &lt;a href="http://erikej.blogspot.com/2009/04/sql-compact-3rd-party-tools.html" target="_blank"&gt;using a tool&lt;/a&gt;, you can follow this simple procedure to generate and add the DataContext to your Windows Phone solution.&lt;/p&gt;  &lt;p&gt;Anyone using the Express tools will notice that SQLMetal (which is used behind the scenes to create the DataContext file) is not included. You can get it from the Microsoft SDK bundle &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=8279"&gt;http://www.microsoft.com/download/en/details.aspx?id=8279&lt;/a&gt;. You only need to choose the following options to get the required files. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-qYSDy9g6JN4/TxQUKv7-NFI/AAAAAAAAAqQ/mJm2V24hZnI/s1600-h/image%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-N0ENSmoYicY/TxQULB_fj1I/AAAAAAAAAqU/Jx6aWg8HoDA/image_thumb%25255B2%25255D.png?imgmax=800" width="457" height="346" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Then go to the &lt;a href="http://exportsqlce.codeplex.com/releases/view/52878" target="_blank"&gt;download page&lt;/a&gt; for my ExportSqlCe tool, and download the &lt;a href="http://exportsqlce.codeplex.com/releases/view/52878#DownloadId=160021" target="_blank"&gt;latest version&lt;/a&gt; of the Exportsqlce.exe command line utility.&lt;/p&gt;  &lt;p&gt;You can now generate a DataContext file from the command line, as &lt;a href="http://exportsqlce.codeplex.com/wikipage?title=Command%20line%20utilities&amp;amp;referringTitle=Documentation" target="_blank"&gt;documented here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In this example, I will generate a DataContext based on the &lt;a href="http://chinookdatabase.codeplex.com/" target="_blank"&gt;Chinook sample database&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;exportsqlce wpdc &amp;quot;Data Source=C:\projects\Chinook\Chinook.sdf&amp;quot; C:\temp\Chinook.cs&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Notice that the format of the database must be SQL Server Compact 3.5. &lt;/p&gt;  &lt;p&gt;In Visual Studio, open your Windows Mango project, and from Solution Explorer, select Add, Existing Item, and browse to the file the was just created.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-oEHzyGs2bcY/TxQOhmyDg8I/AAAAAAAAApw/ok5zDZ9_-FI/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-OhVA0y0ClFQ/TxQOiKDIHuI/AAAAAAAAAp0/OPzkAMZgIuM/image_thumb%25255B1%25255D.png?imgmax=800" width="359" height="347" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Remember to add a reference to System.Data.Linq to your project. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-IBHT8fxeR6Q/TxQOik7a6lI/AAAAAAAAAqA/IEtyLnd9mm4/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-Dm8lDJNmqAY/TxQOjd9LFhI/AAAAAAAAAqI/O-CuQ2OT4cI/image_thumb%25255B3%25255D.png?imgmax=800" width="266" height="225" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can now start using the generated DataContext in your project! &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(ChinookContext db = &lt;span style="color: blue"&gt;new &lt;/span&gt;ChinookContext(ChinookContext.ConnectionString))&lt;br /&gt;{&lt;br /&gt;    db.LogDebug = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;var &lt;/span&gt;artist = db.Artists.FirstOrDefault();&lt;br /&gt;    artist.Name = &lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;.NewGuid().ToString();&lt;br /&gt;&lt;br /&gt;    db.SubmitChanges();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Happy coding…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-940036027139882448?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/9zLYtKWyRnM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/9zLYtKWyRnM/generating-linq-to-sql-datacontext-with.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-N0ENSmoYicY/TxQULB_fj1I/AAAAAAAAAqU/Jx6aWg8HoDA/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2012/01/generating-linq-to-sql-datacontext-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-7617070024766731680</guid><pubDate>Sun, 08 Jan 2012 16:00:00 +0000</pubDate><atom:updated>2012-01-28T16:59:30.007+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact Toolbox 2.6.1–Visual Guide of new features</title><description>&lt;p&gt;After more than 85.000 downloads, version 2.6.1 of my &lt;a href="http://sqlcetoolbox.codeplex.com/" target="_blank"&gt;SQL Server Compact Toolbox&lt;/a&gt; extension for Visual Studio 2010 is now &lt;a href="http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/" target="_blank"&gt;available for download&lt;/a&gt;. This blog post is a visual guide to the new features included in this release, many suggested by users of the tool via the &lt;a href="http://sqlcetoolbox.codeplex.com/workitem/list/basic" target="_blank"&gt;CodePlex issue tracker&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Edit Table Data&lt;/h3&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;a href="http://lh4.ggpht.com/-mUnDvLBhqZc/Twm9zpwIHoI/AAAAAAAAAoA/4oN3Lzhf93U/s1600-h/clip_image0015.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://lh6.ggpht.com/-ELv01zOjVpk/Twm90Mq87NI/AAAAAAAAAoE/M5kBam3WPw0/clip_image001_thumb2.png?imgmax=800" width="275" height="66" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This feature, which allows you to edit the table data in a grid, and allows column sorting, image import/export and quick search, has been enhanced with the following new features:&lt;/p&gt;  &lt;p&gt;The grid now only loads the first 200 rows, to better handle large tables. The number of rows initially loaded can be configured via the Options dialog:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-DFjx2Ind7-4/Twm9030SaDI/AAAAAAAAAoQ/FhCGlfMradg/s1600-h/clip_image0024.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh3.ggpht.com/-v8Kt8RBubCM/Twm91sXDCAI/AAAAAAAAAoY/Xc_W4DCPW9U/clip_image002_thumb1.png?imgmax=800" width="377" height="60" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In addition, you can use any SELECT statement as the basis for the grid, by entering this statement using the SQL button at the bottom of the grid:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-wdcnQYqqq6o/Twm92pGbaRI/AAAAAAAAAog/YzctW5jlMdo/s1600-h/clip_image0035.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://lh4.ggpht.com/-6e8DMwceh_k/Twm93itg3bI/AAAAAAAAAoo/t6NodBMCHgw/clip_image003_thumb2.png?imgmax=800" width="392" height="57" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Pressing this button will give you access to enter any SQL SELECT statement:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-QemnAcOwCOQ/Twm94PmeNeI/AAAAAAAAAow/qnyGsOtNPmo/s1600-h/clip_image0054.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image005" border="0" alt="clip_image005" src="http://lh6.ggpht.com/-4Aq45_JYVgE/Twm95AsM8WI/AAAAAAAAAo4/Qu7HaOhXnbg/clip_image005_thumb1.jpg?imgmax=800" width="448" height="350" /&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;Windows Phone DataContext&lt;/h3&gt;  &lt;p&gt;The Windows Phone DataContext feature allows you generate a DataContext for use in Windows Phone projects, based on an existing database, saving you a large coding effort. This feature has been enhanced as follows:&lt;/p&gt;  &lt;p&gt;You can now generate a DataContext in VB code, in addition to C# code:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-wUI3whDttNA/Twm957YNLYI/AAAAAAAAAo8/4q9YpBK_ubQ/s1600-h/clip_image0074.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image007" border="0" alt="clip_image007" src="http://lh6.ggpht.com/-WPsFY97lPks/Twm96b33f_I/AAAAAAAAApI/l7LpkI6j4-8/clip_image007_thumb1.jpg?imgmax=800" width="381" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The generated DataContext contains to new useful properties:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;PostCodesContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;PostCodesContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;PostCodesContext&lt;/span&gt;.ConnectionStringReadOnly))&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;if &lt;/span&gt;(System.Diagnostics.&lt;span style="color: #2b91af"&gt;Debugger&lt;/span&gt;.IsAttached)&lt;br /&gt;    {&lt;br /&gt;        db.LogDebug = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;    _allItems = db.PostCode.ToList();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;ConnectionStringReadOnly&lt;/b&gt; allows you to include a database for reference data, and using the appdata:// syntax on the connection string, this database can reside in your programs folder, no need to copy to Isolated Storage.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;LogDebug&lt;/b&gt; allows you to log any SQL statement generated to the Visual Studio debug output window, as described in my &lt;a href="http://erikej.blogspot.com/2011/11/windows-phone-local-database-tip.html" target="_blank"&gt;blog post here.&lt;/a&gt; A big thanks to Nicolò Carandini, who insipred me by mail and &lt;a href="http://blogs.ugidotnet.org/Nick60/archive/2011/11/21/sql-compact-skip-take-and-sql-emitted-code.aspx" target="_blank"&gt;this blog post&lt;/a&gt; to add this feature.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Explorer Tree&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The Tables node now has a Refresh menu item, allowing you to refresh only objects in a single database:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-LN_5ddWaRJs/Twm97B7G4AI/AAAAAAAAApM/4LOZw1Ots3o/s1600-h/clip_image0084.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://lh4.ggpht.com/-jEs--Rlr2Hw/Twm97-kT6XI/AAAAAAAAApY/09WtzvOgZlE/clip_image008_thumb1.png?imgmax=800" width="384" height="224" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In addition, when running ALTER, DROP and CREATE scripts, a refresh will be attempted.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Object Descriptions&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can now edit all the descriptions for a table in a single window, thanks to new contributor giddy:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-hU_Z-u1v0yM/Twm98vuhnjI/AAAAAAAAApc/6I1Rc_9pqLU/s1600-h/clip_image0104.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://lh5.ggpht.com/-UAVozMzCAPw/Twm99gHhNeI/AAAAAAAAApo/BYAzgl21fZw/clip_image010_thumb1.jpg?imgmax=800" width="436" height="344" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Scripting entire database – table selection&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;When scripting an entire SQL Server or SQL Server Compact database, you now have the option to exclude tables from being scripted:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-7_wXmeWfQ9A/TyQbXKGAiAI/AAAAAAAAArI/FgGn0E_ytow/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-6cBK2Vr_N0I/TyQbXgRRpGI/AAAAAAAAArQ/uXcT8thOh4E/image_thumb%25255B1%25255D.png?imgmax=800" width="362" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Other minor improvements&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;All Dialogs cleaned up for VS UI compliance ( Thanks to new contributor &lt;a href="http://www.codeplex.com/site/users/view/giddy"&gt;giddy&lt;/a&gt; ) &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Stopped handling unhandled exceptions, had undesired side effects &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Warning when Primary Keys were missing when creating DataContext and EDMX &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Using a &amp;quot;nicer&amp;quot; property grid&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;See &lt;a href="http://sqlcetoolbox.codeplex.com/workitem/list/advanced?keyword=&amp;amp;status=Closed&amp;amp;type=All&amp;amp;priority=All&amp;amp;release=Release%202.6%20VS%202010%20add-in%20for%203.5%20and%204.0&amp;amp;assignedTo=All&amp;amp;component=All&amp;amp;sortField=LastUpdatedDate&amp;amp;sortDirection=Descending&amp;amp;page=0" target="_blank"&gt;this overview&lt;/a&gt; of the work items in this release.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-7617070024766731680?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/nNNP0v2RGng" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/nNNP0v2RGng/sql-server-compact-toolbox-26visual.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-ELv01zOjVpk/Twm90Mq87NI/AAAAAAAAAoE/M5kBam3WPw0/s72-c/clip_image001_thumb2.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2012/01/sql-server-compact-toolbox-26visual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-5788804262081094637</guid><pubDate>Wed, 04 Jan 2012 09:35:00 +0000</pubDate><atom:updated>2012-01-04T10:35:32.417+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Server Compact Edition</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>CSV to SQL Server Compact scripting utility</title><description>&lt;p&gt;My &lt;a href="http://exportsqlce.codeplex.com/" target="_blank"&gt;SSMS&lt;/a&gt; and &lt;a href="http://sqlcetoolbox.codeplex.com/" target="_blank"&gt;Visual Studio&lt;/a&gt; add-ins for SQL Server Compact includes the option to &lt;a href="http://exportsqlce.codeplex.com/documentation#Import" target="_blank"&gt;import CSV files&lt;/a&gt;. But this GUI based feature does not work so well with larger CSV files, as the generated INSERT script can become very large. So I have now made available a &lt;a href="http://csv2sqlce.codeplex.com/" target="_blank"&gt;command line utility&lt;/a&gt; that performs the same functionality, but works better with larger CSV files (and allows you to automate the process).&lt;/p&gt;  &lt;p&gt;Please give the utility a try, and provide feedback &lt;a href="http://csv2sqlce.codeplex.com/workitem/list/basic" target="_blank"&gt;here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-qGOUQ6h9rPA/TwQdYHoEVNI/AAAAAAAAAnw/G9xWzkuDFZ4/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-nQ4ZFp4wDl4/TwQdYs9VsDI/AAAAAAAAAn0/4DjxmBaN51A/image_thumb%25255B1%25255D.png?imgmax=800" width="465" height="488" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-5788804262081094637?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/Sx_7AqjbnjE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/Sx_7AqjbnjE/csv-to-sql-server-compact-scripting.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-nQ4ZFp4wDl4/TwQdYs9VsDI/AAAAAAAAAn0/4DjxmBaN51A/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2012/01/csv-to-sql-server-compact-scripting.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-3789230354785881269</guid><pubDate>Thu, 22 Dec 2011 08:19:00 +0000</pubDate><atom:updated>2011-12-22T09:29:22.446+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><title>Windows Phone Local Database tip: Exploring INSERT performance–5 power tweaks</title><description>&lt;p&gt;Josué Yeray Julián, (blog in Spanish &lt;a href="http://geeks.ms/blogs/jyeray/" target="_blank"&gt;here&lt;/a&gt;), has done some interesting tests on INSERT performance, both on the emulator (like I started doing in &lt;a href="http://erikej.blogspot.com/2011/12/windows-phone-local-database-tip-batch.html" target="_blank"&gt;my previous blog post&lt;/a&gt;) and on two real devices, an HTC Mazaa and Nokia Lumia 800. (Sadly, I do not own a real device – yet!)&lt;/p&gt;  &lt;p&gt;In summary,&amp;#160; the following parameters can improve performance for doing INSERTs of 500.000 rows:&lt;/p&gt;  &lt;p&gt;1: Set “Max Database Size” on your connection string&amp;#160; to an expected size in advance (default is 32 MB, max is 512 MB on Windows Phone)&lt;/p&gt;  &lt;p&gt;2: Increase “Max Buffer Size” to a value higher than the default of 384 KB. On the tested real devices the max of 4096 worked best.&lt;/p&gt;  &lt;p&gt;3: Run the INSERT process in a background thread.&lt;/p&gt;  &lt;p&gt;4: Remove any Version columns (if only INSERTSs matter, not UPDATEs)&lt;/p&gt;  &lt;p&gt;5: Use InsertAllOnSubmit instead of InsertOnSubmit&lt;/p&gt;  &lt;p&gt;These tweaks reduced the total processing time on the Nokia Lumia 800 from 29:20 to 16:04!&lt;/p&gt;  &lt;p&gt;But - keep in mind that you can use Database first development with the SQL Server Compact Toolbox add-in and then include the database with your application package. You can also use the SqlCeBlukCopy API to insert 1.000.000 rows (twice as many as tested) in 6 seconds on the desktop!&lt;/p&gt;  &lt;p&gt;You can read the Microsoft Translator versions of his 2 blog posts &lt;a href="http://www.microsofttranslator.com/bv.aspx?from=&amp;amp;to=en&amp;amp;a=http%3A%2F%2Fgeeks.ms%2Fblogs%2Fjyeray%2Farchive%2F2011%2F12%2F08%2Fwindows-phone-7-5-inserciones-masivas-en-sql-server-ce-vs-sql-server-vs-mongodb.aspx" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://www.microsofttranslator.com/bv.aspx?from=&amp;amp;to=en&amp;amp;a=http://geeks.ms/blogs/jyeray/archive/2011/12/21/windows-phone-7-5-inserciones-masivas-en-sql-server-ce-vs-sql-server-vs-mongodb-y-ii.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-3789230354785881269?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/bCtB0pA6U_4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/bCtB0pA6U_4/windows-phone-local-database-tip.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/12/windows-phone-local-database-tip.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-1629886088891314903</guid><pubDate>Sun, 11 Dec 2011 17:55:00 +0000</pubDate><atom:updated>2011-12-12T08:36:32.491+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>Windows Phone Local Database tip: Batch INSERT performance</title><description>&lt;p&gt;You could imagine a scenario, where one of the tables in your local database need to be periodically updated. For Windows Phone Local Database, there is no support for Sync Framework or similar technologies, so you may have to simply add a bunch of rows to your table, based on data retrieved from a web service. This blog post explores how SQL Server Compact on the device does INSERTs, and how batch INSERTs can be tweaked for optimum performance.&lt;/p&gt;  &lt;p&gt;Let’s start by using the DebugWriter class from my previous post, and examine what INSERT statements look like. For this test, I have included a copy of the Chinook database with the phone application as an embedded resource, so the test table already contains 275 rows. Then use this code to view INSERT statements.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private void &lt;/span&gt;button1_Click(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;RoutedEventArgs &lt;/span&gt;e)&lt;br /&gt;{&lt;br /&gt;    CleanDatabase();&lt;br /&gt;    &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString))&lt;br /&gt;    {&lt;br /&gt;        db.LogDebug = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;var &lt;/span&gt;artist = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Artist&lt;/span&gt;();&lt;br /&gt;        artist.Name = &lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;.NewGuid().ToString();&lt;br /&gt;&lt;br /&gt;        db.Artist.InsertOnSubmit(artist);&lt;br /&gt;        db.SubmitChanges();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;private static void &lt;/span&gt;CleanDatabase()&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;store = &lt;span style="color: #2b91af"&gt;IsolatedStorageFile&lt;/span&gt;.GetUserStoreForApplication())&lt;br /&gt;    {&lt;br /&gt;        store.Remove();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString))&lt;br /&gt;    {&lt;br /&gt;        db.CreateIfNotExists();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This results – surprisingly – in the following output:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;-- CURSOR BASED INSERT [Artist]&lt;br /&gt;-- [Name] &amp;lt;= [2807fb28-49d7-4a25-8350-e4e40245934a]&lt;br /&gt;&lt;br /&gt;-- AUTOSYNC [ArtistId] &amp;lt;= [276]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This indicates that in order to perform INSERTs to the Local Database, the query processor is bypassed (no “INSERT” SQL statement is shown). Instead, the LINQ to SQL implementation on the device uses the &lt;a href="http://msdn.microsoft.com/en-us/library/sew727fw(v=VS.90).aspx" target="_blank"&gt;SqlCeResultSet&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.sqlceupdatablerecord(v=VS.90).aspx" target="_blank"&gt;SqlCeUpdateableRecord&lt;/a&gt; classes (or equivalent), that allows you to access the database tables without the overhead of the query processor, similar to what I use in the &lt;a href="http://sqlcebulkcopy.codeplex.com/" target="_blank"&gt;SqlCeBulkCopy library&lt;/a&gt; for performing fast INSERTs in SQL Server Compact databases on the desktop. So for INSERTs, the device implementation is already optimized in that respect.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Let’s then look at the speed of “many” INSERTs, in this case 10000. The following code implements this test:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;CleanDatabase();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString))&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Artist&lt;/span&gt;&amp;gt; artistList = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Artist&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;int &lt;/span&gt;i = 0; i &amp;lt; 10000; i++)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue"&gt;var &lt;/span&gt;artist = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Artist&lt;/span&gt;();&lt;br /&gt;        artist.Name = &lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;.NewGuid().ToString();&lt;br /&gt;&lt;br /&gt;        artistList.Add(artist);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    db.Artist.InsertAllOnSubmit(artistList);&lt;br /&gt;    System.Diagnostics.&lt;span style="color: #2b91af"&gt;Stopwatch &lt;/span&gt;sw = &lt;span style="color: blue"&gt;new &lt;/span&gt;System.Diagnostics.&lt;span style="color: #2b91af"&gt;Stopwatch&lt;/span&gt;();&lt;br /&gt;    sw.Start();&lt;br /&gt;    db.SubmitChanges();&lt;br /&gt;    sw.Stop();&lt;br /&gt;    System.Diagnostics.&lt;span style="color: #2b91af"&gt;Debug&lt;/span&gt;.WriteLine(sw.ElapsedMilliseconds);            &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;On my emulator, this takes about 2500 ms for each run. So 2.5 seconds to insert 10.000 rows – no too bad. Let’s see if there are any knobs available in the connection string parameters that will allow us to tweak this. The connection string parameters available for Windows Phone Local Database are &lt;a href="http://msdn.microsoft.com/en-us/library/hh202861(v=VS.92).aspx" target="_blank"&gt;documented here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Inspired by &lt;a href="http://windowsmobiledn.com/tuning-sql-compact-edition-insert-performance/" target="_blank"&gt;this article&lt;/a&gt; by Joao Paulo Figueira, we could try to increase the Max Buffer Size from it’s default value of 384 K to 1024 K.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This can be done in the connection string like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext &lt;/span&gt;db = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;ChinookContext&lt;/span&gt;.ConnectionString + &lt;span style="color: #a31515"&gt;&amp;quot;;max buffer size=1024&amp;quot;&lt;/span&gt;))&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And lo and behold, the same process of inserting 10000 rows now takes 1.6 seconds on my emulator, a 36% improvement! (Your mileage may vary, of course).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Note: Increasing above 1024 buffer size had no positive effect.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Hope you found this useful.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Speaking of Data on Windows Phone, I will be reviewing the &lt;em&gt;&lt;a href="http://www.packtpub.com/windows-phone-7-5-for-storing-managing-manipulating-data-cookbook/book" target="_blank"&gt;Windows Phone 7.5 Data Cookbook&lt;/a&gt; &lt;/em&gt;soon, you can download a sample chapter on Isolated Storage from &lt;a href="http://www.packtpub.com/sites/default/files/1222EXP-Chapter-2-Isolated-Storage.pdf?utm_source=packtpub&amp;amp;utm_medium=free&amp;amp;utm_campaign=pdf" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-1629886088891314903?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/CmI7Lo2WloM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/CmI7Lo2WloM/windows-phone-local-database-tip-batch.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/12/windows-phone-local-database-tip-batch.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-5019927841404726159</guid><pubDate>Mon, 28 Nov 2011 17:43:00 +0000</pubDate><atom:updated>2011-11-28T18:43:49.168+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>Windows Phone Local Database tip: Viewing the SQL generated by LINQ to SQL</title><description>&lt;p&gt;It may sometimes by useful to be able to see the SQL statements generated by an ORM, in order to understand better what is going on, and why things perform the way they do. With LINQ to SQL on desktop, you can assign any TextWriter object to the DataContext Log property, and this will allow you to log to a file or the console. &lt;/p&gt;  &lt;p&gt;On Windows Phone, this gets a little bit complicated, as files must be stored in Isolated Storage, making them hard to get at, and there is no Console. This &lt;a href="http://blogs.msdn.com/b/jgalla/archive/2011/05/27/datacontext-log-and-windows-phone.aspx" target="_blank"&gt;MSDN blog&lt;/a&gt; includes a TextWriter implementation, that writes to the console of a attached debugger, for example the Visual Studio Debug output Window. This class (which I have renamed to DebugWriter) will be part of the DataContext generated by the next SQL Server Compact Toolbox release. So now you can add the following while debugging your LINQ to SQL statements:&lt;/p&gt;  &lt;pre class="code"&gt;db.Log = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;DebugWriter&lt;/span&gt;();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;We can now try some various LINQ queries against our database to find out how they have been implemented in SQL (I am using the excellent Chinook sample database, available for download &lt;a href="http://chinookdatabase.codeplex.com/releases/view/55169" target="_blank"&gt;here&lt;/a&gt;):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;db.Album.Where(al =&amp;gt; al.AlbumId == 10).SingleOrDefault();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And the output in the Debug output window:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-0ITyoxSAWUg/TtPIUbaFiPI/AAAAAAAAAng/FkhkHvVDW48/s1600-h/image6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-8GfoOOHphLE/TtPIU_nHmhI/AAAAAAAAAno/W6Jbqq7rFyc/image_thumb2.png?imgmax=800" width="465" height="125" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;db.Album.FirstOrDefault(); &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Becomes:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;SELECT TOP (1) [t0].[AlbumId], [t0].[Title], [t0].[ArtistId]&lt;br /&gt;FROM [Album] AS [t0]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;db.Album.Where(al =&amp;gt; al.Title.StartsWith(&lt;span style="color: #a31515"&gt;&amp;quot;For those%&amp;quot;&lt;/span&gt;)).FirstOrDefault();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Becomes:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;SELECT TOP (1) [t0].[AlbumId], [t0].[Title], [t0].[ArtistId]&lt;br /&gt;FROM [Album] AS [t0]&lt;br /&gt;WHERE [t0].[Title] LIKE @p0&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;db.Album.Skip(50).Take(25).ToList();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Becomes:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;SELECT [t0].[AlbumId], [t0].[Title], [t0].[ArtistId]&lt;br /&gt;FROM [Album] AS [t0]&lt;br /&gt;ORDER BY [t0].[AlbumId] OFFSET @p0 ROWS FETCH NEXT @p1 ROWS ONLY&lt;/pre&gt;&lt;br /&gt;Notice that the last statement uses OFFSET and FETCH, a syntax only introduced in SQL Server Compact 4.0, but apparently retrofitted into the version 3.5 engine running on Windows Phone.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Happy SQL debugging!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-5019927841404726159?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/fyKnYI6SCOI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/fyKnYI6SCOI/windows-phone-local-database-tip.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-8GfoOOHphLE/TtPIU_nHmhI/AAAAAAAAAno/W6Jbqq7rFyc/s72-c/image_thumb2.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/11/windows-phone-local-database-tip.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-5907434383563342676</guid><pubDate>Mon, 14 Nov 2011 15:53:00 +0000</pubDate><atom:updated>2011-11-14T16:53:40.228+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL CE</category><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Server Compact Edition</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">SQL Mobile</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Compact 3rd party tools</title><description>&lt;p&gt;This is an attempt at a comprehensive list of SQL Server Compact 3rd party tools, both commercial and non-commercial. Please let me know if I have missed anything, and I will add it.&lt;/p&gt;  &lt;p&gt;Just to summarize, the current Microsoft supplied tools are the following:&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 (3.5 SP2)   &lt;br /&gt;Visual Studio 2010 SP1 + 4.0 Tools (3.5 SP2 + 4.0)     &lt;br /&gt;WebMatrix (4.0)&lt;/p&gt;  &lt;p&gt;New or updated entries are noted with &lt;font color="#ff0000"&gt;(new)&lt;/font&gt; or &lt;font color="#ff0000"&gt;(updated)      &lt;br /&gt;&lt;/font&gt;&lt;font color="#000000"&gt;”Last updated” indicates when the tool was last updated by it’s author.&lt;/font&gt;&lt;/p&gt;  &lt;h6&gt;&lt;/h6&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;Commercial tools&lt;/h4&gt;  &lt;p&gt;Name: &lt;strong&gt;Data Port Console&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://primeworks-mobile.com/Products/DataPortConsole.html" href="http://primeworks-mobile.com/Products/DataPortConsole.html"&gt;http://primeworks-mobile.com/Products/DataPortConsole.html&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0, 3.5, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;”Manage all your SQL Compact Edition databases from one central location with the new Data Port Console.”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;DesktopSqlCe&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://primeworks-mobile.com/Products/DesktopSqlCe.html" href="http://primeworks-mobile.com/Products/DesktopSqlCe.html"&gt;http://primeworks-mobile.com/Products/DesktopSqlCe.html&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0, 3.5     &lt;br /&gt;Last updated: 2010     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;”DesktopSqlCe is a desktop &lt;strong&gt;.NET Framework&lt;/strong&gt; component to remotely access &lt;strong&gt;SQL Server Compact Edition&lt;/strong&gt;,&amp;#160; &lt;strong&gt;SQL Mobile&lt;/strong&gt; and &lt;strong&gt;SQL CE 2.0&lt;/strong&gt; databases on mobile or embedded devices.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;Data Port Wizard&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://primeworks-mobile.com/Products/DataPortWizard.html" href="http://primeworks-mobile.com/Products/DataPortWizard.html"&gt;http://primeworks-mobile.com/Products/DataPortWizard.html&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;”Quickly and easily transfer databases from the desktop to the Mobile Device and back. Data Port Wizard will make full copies of your &lt;strong&gt;Microsoft Access&lt;/strong&gt; or &lt;strong&gt;Microsoft SQL Server&lt;/strong&gt; databases into &lt;strong&gt;SQL Server Compact Edition 3.5 and 3.0&lt;/strong&gt;, and &lt;strong&gt;SQL CE 2.0&lt;/strong&gt; databases - and back.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;Data Port Command&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a href="http://primeworks-mobile.com/Products/DataPortCommand.html"&gt;http://primeworks-mobile.com/Products/DataPortCommand.html&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0, 3.5     &lt;br /&gt;Last updated: 2010     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;”Quickly and easily transfer databases from the desktop to the Mobile Device and back. Data Port Command will make full copies of your &lt;strong&gt;Microsoft Access&lt;/strong&gt; or &lt;strong&gt;Microsoft SQL Server&lt;/strong&gt; databases into &lt;strong&gt;SQL Server Compact Edition&lt;/strong&gt; databases - and back.”&lt;/p&gt;  &lt;p&gt;Name: &lt;b&gt;SQLCE Desktop Manager v2.00&lt;/b&gt;     &lt;br /&gt;Link: &lt;a title="http://www.b3team.com/sqlcedesktopmanager.html" href="http://www.b3team.com/sqlcedesktopmanager.html"&gt;http://www.b3team.com/sqlcedesktopmanager.html&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0, 3.5     &lt;br /&gt;Last updated: 2007     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;“&lt;b&gt;SQLCE Desktop Manager v2.00&lt;/b&gt; is available! This application will help you manage your SQL Server Compact Edition, Mobile Edition, SQL Server CE and SQLite 3 databases on PC or Windows CE/Mobile devices directly from desktop computer. With it you can create databases, design tables, edit data and run SQL queries.”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;SQLCE Database Viewer&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://www.pocketpctoolkit.com/index.php" href="http://www.pocketpctoolkit.com/index.php"&gt;http://www.pocketpctoolkit.com/index.php&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0, 3.5     &lt;br /&gt;Last updated: 2007     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;”&lt;strong&gt;The easiest way to view and edit your device's SQLCE databases, directly on your Desktop ! &lt;/strong&gt;View and edit the tables, columns and data in your device's SQLCE 2.0 and SQL Server Mobile, and SQLCE Compact Edition v3.5 tables. Export their data structures (and data) into any ODBC data source. View and edit your device's registry entries &amp;amp; processes. Built-in file explorer - the easiest way to view, open and execute the files on your device.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SDF Viewer&lt;/strong&gt;&amp;#160; &lt;br /&gt;Link: &lt;a title="http://www.flyhoward.com/SDF_Viewer.aspx" href="http://www.flyhoward.com/SDF_Viewer.aspx"&gt;http://www.flyhoward.com/SDF_Viewer.aspx&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.0, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32     &lt;br /&gt;“The simple way to create, view, edit or export the data in your Windows Mobile or Pocket PC device's SQLCE database, from the convenience of your Desktop. Run SQL commands on your SQLCE databases, and view the results instantly.”&lt;/p&gt; Name: &lt;strong&gt;Pocket DB&lt;/strong&gt;   &lt;br /&gt;Link: &lt;a title="http://www.cdsoftwaresolutions.com/PocketDB.aspx" href="http://www.cdsoftwaresolutions.com/PocketDB.aspx"&gt;http://www.cdsoftwaresolutions.com/PocketDB.aspx&lt;/a&gt;   &lt;br /&gt;SQL CE Versions: 3.5   &lt;br /&gt;Last updated: 2009   &lt;br /&gt;Platforms: Windows Mobile 6   &lt;br /&gt;“a database program designed for the new Windows Mobile 6.0 Pocket PCs, the Sprint HTC Touch in specific, and all WM6 devices with a 240x320 screen in general.&amp;#160; The program uses the latest Microsoft SQL Server Compact 3.5 database engine. Pocket DB includes a desktop utility to convert your Access databases (ACCDB or MDB) to the SQL Compact SDF format.”   &lt;p&gt;Name: &lt;strong&gt;RemoteSqlCe&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://www.gui-innovations.com/html/remotesqlce.html" href="http://www.gui-innovations.com/html/remotesqlce.html"&gt;http://www.gui-innovations.com/html/remotesqlce.html&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 2.0, 3.0     &lt;br /&gt;Last updated: 2007     &lt;br /&gt;Platforms: Windows CE, Win32     &lt;br /&gt;”SqlServerCE is a great database for Pocket PC’s, but designing, maintaining and querying databases on the PPC, especially whilst developing, can be wearing. We developed this tool to help us when developing for SqlServerCE. With RemoteSQLCe you can completely manage your SqlServerCE database from the desktop. RemoteSQLCE works in the cradle, and over ethernet/bluetooth.”&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;h4&gt;Non-commercial (free) tools &lt;/h4&gt;  &lt;h2&gt;My CodePlex Tools&lt;/h2&gt;  &lt;p&gt;Name: &lt;strong&gt;SQL Server Compact Toolbox &lt;font color="#ff0000"&gt;(updated)&lt;/font&gt;&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://exportsqlce.codeplex.com/" href="http://sqlcetoolbox.codeplex.com/" target="_blank"&gt;http://sqlcetoolbox.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64&amp;#160; &lt;br /&gt;Added to list: 29th June 2010     &lt;br /&gt;”Add-in for Visual Studio 2010 (for 3.5 and 4.0). Standalone app (for 4.0)     &lt;br /&gt;Adds several features to help your SQL Server Compact development efforts:     &lt;br /&gt;- Scripting of tables, including data.     &lt;br /&gt;- Script of entire schema, optionally with data, both of SQL Server Compact and SQL Server 2005 or later databases, including SQL Azure.     &lt;br /&gt;- Import to SQL Compact 3.5 from a server database or CSV file.     &lt;br /&gt;- Basic, free form query execution.     &lt;br /&gt;- Generation of DGML files for visualizing table relationships     &lt;br /&gt;- Database Diff Script     &lt;br /&gt;- Detect database file version     &lt;br /&gt;- Generate EDMX in any project type     &lt;br /&gt;- Generate Windows Phone DataContext     &lt;br /&gt;- Fix broken connection definitions”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;SqlCeScripting.dll &lt;font color="#ff0000"&gt;(updated)&lt;/font&gt;&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://exportsqlce.codeplex.com/" href="http://exportsqlce.codeplex.com/" target="_blank"&gt;http://exportsqlce.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64&amp;#160; &lt;br /&gt;Added to list: 29th June 2010     &lt;br /&gt;”Scripting library for inclusion in your own application, enumerates SQL Compact objects and allows scripting of these.” &lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SqlCeCmd&lt;/strong&gt;&amp;#160; &lt;br /&gt;Link: &lt;a title="http://sqlcecmd.codeplex.com/" href="http://sqlcecmd.codeplex.com/" target="_blank"&gt;http://sqlcecmd.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: 2010     &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;”Administer SQL Compact databases directly from the command line, without having Visual Studio or SQL Server Management Studio installed. Only requires NetFx 2.0 and SQL Compact installed. Command line options similar to sqlcmd. Runs scripts generated by ExportSqlCe.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;ExportSqlCe&lt;/strong&gt;&amp;#160; &lt;br /&gt;Link: &lt;a title="http://exportsqlce.codeplex.com/" href="http://exportsqlce.codeplex.com/" target="_blank"&gt;http://exportsqlce.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.0, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64&amp;#160; &lt;br /&gt;”This command line utility helps you better manage your SQL Compact development efforts. If allows you to script schema and data from any SQL Compact database file to a .sql file, which can be used in any context. The utility is developed in C# with Visual Studio 2008. You can use the resulting script for documentation, programmatic scripting of SQL Compact database files, or migration of schema and data to SQL Server (Express) 2005 or later. &lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;Export2SqlCe&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://exportsqlce.codeplex.com/" href="http://exportsqlce.codeplex.com/" target="_blank"&gt;http://exportsqlce.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL Server Versions: 2005, 2008&amp;#160; &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32     &lt;br /&gt;Added to list: 4th March 2010     &lt;br /&gt;”A command line utility to script an entire SQL Server 2005 or later database with or without data to a SQL Compact T-SQL script.” &lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;ExportSqlCe SSMS 2008 Addin&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://exportsqlce.codeplex.com/" href="http://exportsqlce.codeplex.com/" target="_blank"&gt;http://exportsqlce.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5     &lt;br /&gt;Last updated: 2011     &lt;br /&gt;Platforms: Win32     &lt;br /&gt;”Script database/table schema/data and also DML&amp;#160; (SELECT, INSERT, UPDATE, DELETE) directly from the Object Explorer in SQL Server 2008 Management Studio (Express). In addition, Edit table data, Import data from as CSV file and Rename the table.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SqlCeBulkCopy &lt;/strong&gt;    &lt;br /&gt;Link: &lt;a title="http://exportsqlce.codeplex.com/" href="http://sqlcebulkcopy.codeplex.com/" target="_blank"&gt;http://sqlcebulkcopy.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current&amp;#160; &lt;br /&gt;Platforms: .NET library, .NET CF library&amp;#160; &lt;br /&gt;Added to list: 4th March 2010&amp;#160; &lt;br /&gt;”.NET Library for loading data fast (doing bulk inserts) into a SQL Server Compact database file. Attempts to mimic the SQLClient SqlBulkCopy API. Includes support for BULK INSERTing any IEnumerable”     &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;h2&gt;Query and database management tools&lt;/h2&gt;  &lt;p&gt;Name: &lt;strong&gt;CompactView &lt;font color="#ff0000"&gt;(new)&lt;/font&gt;&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sourceforge.net/p/compactview/home/Home/" href="http://sourceforge.net/p/compactview/home/Home/" target="_blank"&gt;http://sourceforge.net/p/compactview/home/Home/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.1, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;Added to list: 14th November 2011     &lt;br /&gt;CompactView is a viewer for Microsoft® SQL Server® Compact Edition (SQLCE) database files (*.sdf). CompactView can open database files of versions 3.1, 3.5 and 4.0     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SQL Compact Query Analyzer&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sqlcequery.codeplex.com/" href="http://sqlcequery.codeplex.com/"&gt;http://sqlcequery.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.1, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;Added to list: 3rd July 2011&amp;#160; &lt;br /&gt;&lt;b&gt;Features:&lt;/b&gt;     &lt;br /&gt;- Execute SQL Queries against a SQL Server Compact Edition database     &lt;br /&gt;- Table Data Editor to easily edit the contents of the database     &lt;br /&gt;- Supports SQLCE 3.0, 3.1, 3.5 and 4.0     &lt;br /&gt;- Execute multiple SQL queries (delimited by a semi colon &lt;b&gt;;&lt;/b&gt;)     &lt;br /&gt;- Display query result as XML     &lt;br /&gt;- Shrink and Compact Databases     &lt;br /&gt;- Generate Schema and Data Scripts     &lt;br /&gt;- Display database and schema information &lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;LINQPad&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://www.linqpad.net/" href="http://www.linqpad.net/"&gt;http://www.linqpad.net/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;Added to list: 14th December 2010     &lt;br /&gt;Linqpad allows you to query various data sources via LINQ, including SQL Server Compact 3.5 and 4.0. See this &lt;a href="http://weblogs.asp.net/bleroy/archive/2010/10/18/using-linqpad-to-open-sql-ce-4-0-databases.aspx" target="_blank"&gt;blog post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;Database .NET&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://fishcodelib.com/Database.htm" href="http://fishcodelib.com/Database.htm"&gt;http://fishcodelib.com/Database.htm&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.1, 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;Added to list: 20th September 2010     &lt;br /&gt;“Database .NET is a simple and intuitive database management tool for multiple databases. Making Local and Remote Database Administration Easier, With it you can Create databases, Design tables, Edit data, Export data, Generate scripts and run SQL queries.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;Compact Query&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://www.yohz.com/" href="http://www.yohz.com/"&gt;http://www.yohz.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.0, 3.5     &lt;br /&gt;Last updated: 2010     &lt;br /&gt;Platforms: Win32     &lt;br /&gt;Added to list: 4th March 2010&amp;#160; &lt;br /&gt;”Compact Query is our FREE native code IDE for SQL Server Compact. Have you ever wanted to deploy a lightweight IDE for SQL Server Compact, to allow users to troubleshoot data integrity issues? Then Query Compact is the tool for you. It's magnitudes smaller than Management Studio, is a native code application (so it does not require the .Net framework to be installed)” &lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SQL CE Browser&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://ericwillis.com/notes/2009/12/sql-ce-browser-v-110/" href="http://ericwillis.com/notes/2009/12/sql-ce-browser-v-110/"&gt;http://ericwillis.com/notes/2009/12/sql-ce-browser-v-110/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5     &lt;br /&gt;Last updated: 2010     &lt;br /&gt;Platforms: Win32, Win64 (?)     &lt;br /&gt;Added to list: 4th March 2010&amp;#160; &lt;br /&gt;”Open regular and encrypted/passworded databases for viewing or editing. Write and work with any number of queries at once via tabs. SQL syntax highlighting and SQL syntax verification. Explore columns, keys, and indexes“     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;Mini SQL Query&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://minisqlquery.codeplex.com/" href="http://minisqlquery.codeplex.com/"&gt;http://minisqlquery.codeplex.com/&lt;/a&gt;&amp;#160; &lt;br /&gt;SQL CE Versions: 3.5     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64 (?)     &lt;br /&gt;Added to list: 4th March 2010&amp;#160; &lt;br /&gt;”Mini SQL Query is a minimalist SQL query tool for multiple databases (MSSQL, MSSQL CE, SQLite, OLEDB, MS Access/Excel files etc). The tool uses a generic schema engine taking advantage of the ADO.NET providers. Mini SQL Query is also easily extended with plugins.“&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SQL Server CE Query Tool&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://www.codeproject.com/KB/database/CEQuery.aspx" href="http://cequery.codeplex.com"&gt;http://cequery.codeplex.com&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current&amp;#160; &lt;br /&gt;Platforms: Win32, Win64 (?)     &lt;br /&gt;”&lt;code&gt;CEQuery &lt;/code&gt;is written in C# with the help of Visual Studio 2008 platform. Some of the features of this tool are described below:     &lt;br /&gt;User is able to create CE database. If the schema is provided, the tool is able to create the tables and columns. User is able to overview an existing CE database with its table and column structure in tree format. User can design a query by dragging and dropping tables and columns from the database tree. User can manipulate [&lt;code&gt;Insert&lt;/code&gt;/&lt;code&gt;Update&lt;/code&gt;/&lt;code&gt;Delete&lt;/code&gt;] records in a selected table. User is able to generate scripts from a single table or of whole databases. [Both for SQL CE or SQL Server]. User is able to open multiple SQL Server CE files simultaneously. User is able to convert a SQL Server database to a SDF file with schema and data. User is able to change password of a SQL CE DB. The tool is now capable of handling the database with no password.“&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SeasonStar Database Management(SSDM)&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://ssdm.codeplex.com/" href="http://ssdm.codeplex.com/"&gt;http://ssdm.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5?, 4.0&amp;#160; &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32     &lt;br /&gt;”With support for all major database formats, top-class export functions and advanced feaures like Linq Data Context availabe, SSDM is probably your best choice for DB management. It's even free software!”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SQL CE Database Editor&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sqlcedatabaseeditor.codeplex.com/" href="http://sqlcedatabaseeditor.codeplex.com/"&gt;http://sqlcedatabaseeditor.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5     &lt;br /&gt;Last updated: 2009&amp;#160; &lt;br /&gt;Platforms: Win32     &lt;br /&gt;“Small lightweight application to browse and edit Microsoft SQL CE server databases. Does not require SQL CE server to be installed and can run custom queries.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;DataBoy&lt;/strong&gt;     &lt;br /&gt;Link:&lt;a title="http://exportsqlce.codeplex.com/" href="http://databoy.codeplex.com/"&gt;http://databoy.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.0, 3.5     &lt;br /&gt;Last updated: 2008     &lt;br /&gt;Platforms: Win32     &lt;br /&gt;“Small footprint, portable and simple database query tool. Support SQL CE 3.1, SQL CE 3.5 and SQL Server.”&lt;/p&gt;  &lt;p&gt;Name: &lt;strong&gt;SqlCeExplorer&lt;/strong&gt;     &lt;br /&gt;Link:&lt;a title="http://exportsqlce.codeplex.com/" href="http://sqlceexplorer.codeplex.com/"&gt;http://sqlceexplorer.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current&amp;#160; &lt;br /&gt;Platforms: Win32     &lt;br /&gt;“A Simple GUI for SQL CE Server, using Microsoft .Net windows forms. This utility will help developers to create, and manage SQL CE database, without Visual Studio or SQL Server Management studio.”&lt;/p&gt;  &lt;h2&gt;Other tools and libraries    &lt;br /&gt;&lt;/h2&gt; Name: &lt;strong&gt;SQLite2CE &lt;font color="#ff0000"&gt;(new)&lt;/font&gt;&lt;/strong&gt;   &lt;br /&gt;Link: &lt;a title="http://sqlite2ce.codeplex.com/" href="http://sqlite2ce.codeplex.com/" target="_blank"&gt;http://sqlite2ce.codeplex.com/&lt;/a&gt;   &lt;br /&gt;SQL CE Versions: 3.5   &lt;br /&gt;Last updated: Current   &lt;br /&gt;Platforms: Win32, Win64   &lt;br /&gt;Added to list: 14th November, 2011&amp;#160; &lt;br /&gt;“A tool that converts a SQLite database into SQL CE while simultaneously creating the default data representation classes needed to easily incorporate the new database into your Windows Phone application. The tool migrates the Schema, Table Data, and Views ( but not triggers). The tool handles the differences in data types and does an appropriate migration that is configurable in the settings.xml.”   &lt;p&gt;Name: &lt;strong&gt;SQLCE SCRIPTER &lt;font color="#ff0000"&gt;(new)&lt;/font&gt;&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sqlmgmt.com/sql/SQLCE-Scripter" href="http://sqlmgmt.com/sql/SQLCE-Scripter" target="_blank"&gt;http://sqlmgmt.com/sql/SQLCE-Scripter&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current     &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;Added to list: 14th November, 2011     &lt;br /&gt;“Create SQL schema scripts for tables, indexes and referential relations. Create data scripts so that CE data can be moved to SQL Server or other data store. User can select specific tables only. User can select Script Schema, Script Data or both.”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;SQLCE Code Generator&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sqlmetalosui.codeplex.com/" href="http://sqlcecodegen.codeplex.com/"&gt;http://sqlcecodegen.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5, 4.0     &lt;br /&gt;Last updated: Current&amp;#160; &lt;br /&gt;Platforms: Win32, Win64     &lt;br /&gt;Added to list: 27th March, 2011     &lt;br /&gt;“Contains a stand alone GUI application and a Visual Studio Custom Tool for automatically generating a .NET data access layer code with Unit tests for objects in a SQL Server Compact Edition database. Also generates a Windows Phone DataContext”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;OpenNETCF.ORM Framework&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sqlmetalosui.codeplex.com/" href="http://orm.codeplex.com/"&gt;http://orm.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5     &lt;br /&gt;Last updated: Current&amp;#160; &lt;br /&gt;Platforms: WinCE, Win32, Win64     &lt;br /&gt;Added to list: 27th March, 2011     &lt;br /&gt;“The OpenNETCF.ORM library is a lightweight object-relational mapping framework designed for use with the .NET Compact Framework.The framework is extensible to allow any type of backing store. An initial implementation using SQL Server Compact is provided.”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;SQL Metal Open Source User Interface&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a title="http://sqlmetalosui.codeplex.com/" href="http://sqlmetalosui.codeplex.com/"&gt;http://sqlmetalosui.codeplex.com/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.5     &lt;br /&gt;Last updated: 2008&amp;#160; &lt;br /&gt;Platforms: Win32     &lt;br /&gt;“This project provides an user interface for SqlMetal.exe tool.     &lt;br /&gt;SQLMetalOSUI allows users to generate code and mapping files for their SQL Server Compact Edition databases. SQL Server Compact Edition 3.5 is fully compatible with LINQ to SQL but the designer does not. This project will be focused to reach this initial purpose.”     &lt;br /&gt;    &lt;br /&gt;Name: &lt;strong&gt;MDB2SDF&lt;/strong&gt;     &lt;br /&gt;Link: &lt;a href="http://www.aroooy.com/mdb2sdf/"&gt;http://www.aroooy.com/mdb2sdf/&lt;/a&gt;     &lt;br /&gt;SQL CE Versions: 3.0     &lt;br /&gt;Last updated: 2006     &lt;br /&gt;Platforms: N/A     &lt;br /&gt;”A web page that allows you to upload an Microsoft Access MDB file and converts it to a SQL Compact 3.0 file” &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-5907434383563342676?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/mPd8OW7obQA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/mPd8OW7obQA/sql-compact-3rd-party-tools.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>26</thr:total><feedburner:origLink>http://erikej.blogspot.com/2009/04/sql-compact-3rd-party-tools.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-3452990382480944453</guid><pubDate>Wed, 09 Nov 2011 10:56:00 +0000</pubDate><atom:updated>2011-11-09T18:49:47.341+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Merge Replication</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>SQL Server Compact 3.5 SP2 now supports Merge Replication with SQL Server 2012</title><description>&lt;p&gt;A major update to SQL Server Compact 3.5 SP2 has just been released, version 3.5.8088.0, disguised as a “Cumulative Update Package”. Microsoft knowledgebase article &lt;a href="http://support.microsoft.com/kb/2628887" target="_blank"&gt;2628887&lt;/a&gt; describes the update. &lt;/p&gt;  &lt;p&gt;The update contains updated Server Tools, and updated desktop and device runtimes, all updated to support Merge Replication with the next version of SQL Server, SQL Server 2012.&lt;/p&gt;  &lt;p&gt;For a complete list of Cumulative Updates released for SQL Server Compact 3.5 SP2, see my &lt;a href="http://erikej.blogspot.com/2010/08/sql-server-compact-35-sp2-downloadable.html" target="_blank"&gt;blog post here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is nice to see that the 3.5 SP2 product, with it’s full range of device support and synchronization technologies is kept alive and kicking. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;I &lt;a href="http://erikej.blogspot.com/2011/08/major-update-to-sql-server-compact-35.html" target="_blank"&gt;blogged about&lt;/a&gt; this update earlier, but it was pulled back. Now it is finally available, and all downloads can be requested. (I have downloaded all the ENU ones, anyway)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-3452990382480944453?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/kjKtF4WSYAE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/kjKtF4WSYAE/sql-server-compact-35-sp2-now-supports.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/11/sql-server-compact-35-sp2-now-supports.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-8340878551586110506</guid><pubDate>Mon, 07 Nov 2011 17:40:00 +0000</pubDate><atom:updated>2011-11-07T18:41:40.154+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">Entity Framework</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact Toolbox 2.5–Visual Guide of new features</title><description>&lt;p&gt;After more than 66.000 downloads, version 2.5 of my &lt;a href="http://sqlcetoolbox.codeplex.com/" target="_blank"&gt;SQL Server Compact Toolbox&lt;/a&gt; extension for Visual Studio 2010 is now &lt;a href="http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/" target="_blank"&gt;available for download&lt;/a&gt;. This blog post is a visual guide to the new features included in this release, many suggested by users of the tool via the &lt;a href="http://sqlcetoolbox.codeplex.com/workitem/list/basic" target="_blank"&gt;CodePlex issue tracker&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;Properties of selected Database and Table displayed in Properties window&lt;/h3&gt;  &lt;p&gt;When you navigate the list of SQL Server Compact databases and database objects, the Toolbox now displays properties for a Database and a Table.&lt;/p&gt;  &lt;p&gt;The Database properties are the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-4BkCx_ETYMU/TrgYLc9x4AI/AAAAAAAAAmA/0cfg704y2JU/s1600-h/clip_image001%25255B5%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://lh4.ggpht.com/-xEZQRA06AmA/TrgYMP-TUII/AAAAAAAAAmI/DoqE2J9IvOg/clip_image001_thumb%25255B2%25255D.png?imgmax=800" width="425" height="358" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;And the table properties are these:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-zEnJQ5_Ic6k/TrgYM8AGLUI/AAAAAAAAAmM/X0uF746iic4/s1600-h/clip_image002%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh4.ggpht.com/-M3EoznqpBew/TrgYNjppv9I/AAAAAAAAAmY/iwvSK1wCyQs/clip_image002_thumb%25255B1%25255D.png?imgmax=800" width="422" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;DGML file (database graph) now also contains object descriptions&lt;/h3&gt;  &lt;p&gt;The database graph (DGML) file has been enhanced to display descriptions of Database, Table and Column objects, based on the documentation feature introduced in version 2.3:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-2zJn0nO4KEA/TrgYOr8wjpI/AAAAAAAAAmg/lqMeUUzhfAs/s1600-h/clip_image004%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh3.ggpht.com/-Js89J2fTw5w/TrgYPWn9WcI/AAAAAAAAAmk/Wh0gfFmEPac/clip_image004_thumb%25255B1%25255D.jpg?imgmax=800" width="461" height="343" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Entity Data Model dialog now allows adding configuration for Private Desktop Deployment to app.config&lt;/h3&gt;  &lt;p&gt;When using Entity Framework with Private Deployment of SQL Server Compact, some entries in app.config are required (for Desktop application), as described &lt;a href="http://blogs.msdn.com/b/sqlservercompact/archive/2010/05/12/troubleshooting-problem-with-private-deployment-of-sql-server-compact-3-5sp2-entity-dll.aspx" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html" target="_blank"&gt;here&lt;/a&gt;. This is required, as Entity Framework build in the DbProvider interfaces, which requires some configuration entries.&lt;/p&gt;  &lt;p&gt;These settings can now be added when creating an EDM as shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-_tlgdvsJD0w/TrgYP_-j7ZI/AAAAAAAAAmw/r6PgRWh3aqg/s1600-h/clip_image005%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image005" border="0" alt="clip_image005" src="http://lh6.ggpht.com/-stHn-8zgq0o/TrgYRLdVDMI/AAAAAAAAAm4/PAvP9Bvd_ZE/clip_image005_thumb%25255B1%25255D.png?imgmax=800" width="373" height="416" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Ability to add 3.5 Connections from Toolbox&lt;/h3&gt;  &lt;p&gt;It is now possible to add 3.5 Database Connections to the Server Explorer and the Toolbox directly from the Toolbox, rather than having to go to Server Explorer, add the connection, and then Refresh the Toolbox. You can now do this without leaving the Toolbox, and the Toolbox will refresh “automagically”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-HstRCJHgpF0/TrgYRhPovqI/AAAAAAAAAm8/MgmtdfQ0qTI/s1600-h/clip_image006%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://lh3.ggpht.com/-94AQCXcNdjA/TrgYSipouHI/AAAAAAAAAnI/nh5Pw-7sMsw/clip_image006_thumb%25255B1%25255D.png?imgmax=800" width="434" height="162" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Improved VS UI Guidelines compliance&lt;/h3&gt;  &lt;p&gt;The Toolbars, SQL Editor Font, Dialogs (frame, background and buttons) have been overhauled to comply better with my recent discovery of “Visual Studio UI Guidelines”, available for download &lt;a href="http://archive.msdn.microsoft.com/VS2010UX" target="_blank"&gt;here&lt;/a&gt;. In addition, the Toolbox now follows the chosen Visual Studio Theme (to some extent, anyway).&lt;/p&gt;  &lt;p&gt;This is the “new look” for the Toolbox Explorer and SQL Editor:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Rsa3PwEGpZ4/TrgYTiixBkI/AAAAAAAAAnQ/pbnMwvkRjws/s1600-h/clip_image008%25255B5%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://lh4.ggpht.com/-8eWWMbr8FKc/TrgYUrqd3MI/AAAAAAAAAnY/twPIdTGEWLY/clip_image008_thumb%25255B2%25255D.jpg?imgmax=800" width="466" height="365" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Other minor improvements and fixes&lt;/h3&gt;  &lt;p&gt;- Explorer Treeview: ArgumentException when getting connections   &lt;br /&gt;- WinPhone DataContext: Split files failed with empty database    &lt;br /&gt;- SQL editor: Check if .sqlplan is supported    &lt;br /&gt;- SQL editor: Save button was not working    &lt;br /&gt;- SQL editor: Results pane not always cleared    &lt;br /&gt;- SQL editor: Results as text improved formatting    &lt;br /&gt;- SQL editor: Text scrollbar was overlaid by splitter bar&lt;/p&gt;  &lt;p&gt;As usual, the full source code for these new features is available on CodePlex for you to re-use or maybe improve!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-8340878551586110506?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/Gfi5yqjVjao" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/Gfi5yqjVjao/sql-server-compact-toolbox-25visual.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-xEZQRA06AmA/TrgYMP-TUII/AAAAAAAAAmI/DoqE2J9IvOg/s72-c/clip_image001_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/11/sql-server-compact-toolbox-25visual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-7111448376993397595</guid><pubDate>Thu, 27 Oct 2011 16:18:00 +0000</pubDate><atom:updated>2011-10-27T18:18:21.700+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact 4.0 under ASP.NET Hosting– common issues</title><description>&lt;p&gt;This blog post covers some of the issues that can be encountered when using SQL Server Compact under ASP.NET, in particular in a hosted environment, where the environment can be restricted in unexpected ways.&lt;/p&gt;  &lt;p&gt;In order to be able to troubleshoot issues with ASP.NET hosting of web sites using SQL Server Compact 4.0, it can be useful to understand how Medium Trust works. &lt;/p&gt;  &lt;p&gt;Medium Trust only works under .NET 4.0 (ASP.NET 4.0), as it depends on a configuration in the global web.config.&lt;/p&gt;  &lt;p&gt;The global web.config is located at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config or C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config, and contains the following setting, that was configured when .NET 4.0 was installed:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;?&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;location &lt;/span&gt;&lt;span style="color: red"&gt;allowOverride&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;fullTrustAssemblies&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: red"&gt;assemblyName&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.SqlServerCe&lt;/span&gt;&amp;quot;&lt;br /&gt;            &lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;4.0.0.0&lt;/span&gt;&amp;quot;&lt;br /&gt;            &lt;span style="color: red"&gt;publicKey&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;0024000004800000940000000602000000240000525341310004000001000100272736ad6e5f9586bac2d531eabc3acc666c2f8ec879fa94f8f7b0327d2ff2ed523448f83c3d5c5dd2dfc7bc99c5286b2c125117bf5cbe242b9d41750732b2bdffe649c6efb8e5526d526fdd130095ecdb7bf210809c6cdad8824faa9ac0310ac3cba2aa0523567b2dfa7fe250b30facbd62d4ec99b94ac47c7d3b28f1f6e4c8&lt;/span&gt;&amp;quot;&lt;br /&gt;                &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;fullTrustAssemblies&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;partialTrustVisibleAssemblies &lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;location&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So this was added during installation of .NET 4.0, long before SQL Server Compact 4.0 was released in January 2011. The fullTrustAssemblies element is new in .NET 4.0: &lt;a href="http://weblogs.asp.net/asptest/archive/2010/04/23/what-is-new-in-asp-net-4-0-code-access-security.aspx"&gt;http://weblogs.asp.net/asptest/archive/2010/04/23/what-is-new-in-asp-net-4-0-code-access-security.aspx&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If this section has been removed from the global web.config file, SQL Server Compact 4.0 will not run under medium trust.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It is possible to configure similar functionality under .NET 3.5 SP1, as described here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms174612(v=SQL.110).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms174612(v=SQL.110).aspx&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Other issues you may encounter when running ASP.NET and SQL Server Compact 4.0 can be:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;- The process identity running your web application must have write access to the App_Data folder or the folder where your database file resides:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/6c1c8798-85d7-4d8f-9908-e9f7dc1c17e4"&gt;http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/6c1c8798-85d7-4d8f-9908-e9f7dc1c17e4&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;- SQL Server Compact database files must be located on a local drive, not shared folders:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/7791345/sqlce-4-ef4-1-internal-error-cannot-open-the-shared-memory-region/7804049#7804049"&gt;http://stackoverflow.com/questions/7791345/sqlce-4-ef4-1-internal-error-cannot-open-the-shared-memory-region/7804049#7804049&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;- If SQL Server Compact is not installed locally, a number of files must be included in the bin folder of your web site:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/3223359/cant-get-sql-server-compact-3-5-4-to-work-with-asp-net-mvc-2/3223450#3223450"&gt;http://stackoverflow.com/questions/3223359/cant-get-sql-server-compact-3-5-4-to-work-with-asp-net-mvc-2/3223450#3223450&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg286946.aspx"&gt;http://msdn.microsoft.com/en-us/library/gg286946.aspx&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;- If only .NET 4.0 is present on the server, you may be missing the Visual C++ 2008 SP1 Redistributable Package (which is installed only with .NET 3.5 SP1)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I will update this blog post if I notice more “common issues”.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-7111448376993397595?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/gMwq-uTPOPo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/gMwq-uTPOPo/sql-server-compact-40-under-aspnet.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/10/sql-server-compact-40-under-aspnet.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-327526451423623898</guid><pubDate>Tue, 11 Oct 2011 16:06:00 +0000</pubDate><atom:updated>2011-10-11T18:07:25.663+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL CE</category><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Server Compact Edition</category><category domain="http://www.blogger.com/atom/ns#">Merge Replication</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">SQL Mobile</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact books</title><description>&lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;A number of SQL Compact (or a least SQL Compact related) books have appeared on the market.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;I will attempt to keep this list of books up to date as new material appears.        &lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2"&gt;         &lt;br /&gt;“&lt;/font&gt;&lt;/span&gt;Building Standalone Data-Driven Applications using SQL Server Compact 4.0 and Visual Studio 2010”&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;“Microsoft SQL Server Compact 4.0 (SQL Compact onwards) is a free SQL Server embedded database ideal for building standalone desktop, web, and mobile applications that need local data storage.”&lt;/div&gt;  &lt;div&gt;&lt;a title="http://www.c-sharpcorner.com/Ebooks/" href="http://www.c-sharpcorner.com/Ebooks/" target="_blank"&gt;http://www.c-sharpcorner.com/Ebooks/&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;“Microsoft SQL Server Compact 4.0 Books Online”&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;Microsoft SQL Server Compact 4.0 is a free, embedded database that software developers can use for building ASP.NET websites and Windows desktop applications. Download the documentation to learn about SQL Server Compact 4.0 and to build applications for it.&lt;/div&gt;  &lt;div&gt;&lt;a title="http://www.microsoft.com/download/en/details.aspx?id=21880" href="http://www.microsoft.com/download/en/details.aspx?id=21880" target="_blank"&gt;http://www.microsoft.com/download/en/details.aspx?id=21880&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;strong&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;strong&gt;&lt;font size="2"&gt;         &lt;br /&gt;“La réplication du fusion avec SQL Server Compact: Implémentation and conseils”&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2"&gt;“Free eBook in French about implementation and advise regarding Merge Replication – in many ways similar to the Rob Tiffany book.”&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;a title="http://www.wygwam.com/Documents/ReplicationFusionSQLServerCompact.pdf" href="http://www.wygwam.com/Documents/ReplicationFusionSQLServerCompact.pdf" target="_blank"&gt;http://www.wygwam.com/Documents/ReplicationFusionSQLServerCompact.pdf&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;     &lt;br /&gt;“.NET Compact Framework 3.5 Data Driven Applications”&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;“Develop data-driven mobile applications from the ground up on top of the Oracle Lite and SQL Server Compact”&lt;/div&gt;  &lt;div&gt;&lt;a title="https://www.packtpub.com/data-driven-applications-with-.net-compact-framework-3-5/book" href="http://www.packtpub.com/data-driven-applications-with-.net-compact-framework-3-5/book" target="_blank"&gt;http://www.packtpub.com/data-driven-applications-with-.net-compact-framework-3-5/book&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;“Microsoft SQL Server Compact 3.5 Service Pack 2 Books Online”&lt;/strong&gt;&lt;/div&gt;  &lt;div&gt;This download contains the Books Online for the SP2 version of SQL Server Compact 3.5.&lt;/div&gt;  &lt;div&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?familyid=746C3A6E-FFB1-4C92-93FA-B3BA41FDE681&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?familyid=746C3A6E-FFB1-4C92-93FA-B3BA41FDE681&amp;amp;displaylang=en" target="_blank"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=746C3A6E-FFB1-4C92-93FA-B3BA41FDE681&amp;amp;displaylang=en&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;strong&gt;“SQL Server MVP Deep Dives”&lt;/strong&gt;     &lt;br /&gt;This book with contribution from 53 SQL Server MVPs includes 2 chapters relating to SQL Compact:     &lt;br /&gt;Placing SQL Server in your pocket &lt;em&gt;by Christopher Fairbairn &lt;/em&gt;and Mobile data strategies &lt;em&gt;by John Baird &lt;/em&gt;&lt;em&gt;     &lt;br /&gt;&lt;/em&gt;&lt;a title="http://www.manning.com/nielsen/" href="http://www.manning.com/nielsen/" target="_blank"&gt;http://www.manning.com/nielsen/&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;strong&gt;&lt;font size="2" face="Arial"&gt;&amp;quot;Enterprise Data Synchronization with SQL Server 2008 and SQL Server Compact 3.5&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;An update of the previous book, equally excellent and hands-on.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;Available from &lt;a href="http://www.amazon.com/Enterprise-Synchronization-Microsoft-Compact-Replication/dp/0979891213/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1276064974&amp;amp;sr=8-1" target="_blank"&gt;Amazon&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;strong&gt;&amp;quot;Microsoft Mobile Development Handbook&amp;quot;&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;This book covers development using .NET Compact Framework 2.0 in broad terms, and has two chapters relating to SQL Compact:&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;Chapter 3 describes how to persist data using SQL Compact and how to bind SQL Compact data to UI elements and chapter 7 briefly covers using RDA and merge replication with SQL Compact.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;a href="http://www.microsoft.com/MSPress/books/10294.aspx" target="_blank"&gt;http://www.microsoft.com/MSPress/books/10294.aspx&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;strong&gt;&lt;font size="2" face="Arial"&gt;&amp;quot;Windows Mobile Data Synchronization with SQL Server 2005 and SQL Server Compact 3.1&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;I have already recommended the excellent Merge Replication book by Rob Tiffany here:&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;a href="http://erikej.blogspot.com/2007/10/rob-tiffany-publishes-mobile-merge.html" target="_blank"&gt;http://erikej.blogspot.com/2007/10/rob-tiffany-publishes-mobile-merge.html&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;Available from &lt;a href="http://www.amazon.com/Windows-Mobile-Synchronization-Server-Compact/dp/0979891205/ref=sr_1_7?ie=UTF8&amp;amp;s=books&amp;amp;qid=1199368407&amp;amp;sr=8-7" target="_blank"&gt;amazon&lt;/a&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;strong&gt;         &lt;br /&gt;&amp;quot;Microsoft® SQL Server 2005 Compact Edition&amp;quot; &lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;This book covers the product in full, including a chapter on Native development, and several chapters on replication. The main perspective of this this book is a DBA approach, with only a single chapter covering development per se. There are also useful chapters on security and performance tuning. &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;a href="http://www.informit.com/store/product.aspx?isbn=0672329220" target="_blank"&gt;http://www.informit.com/store/product.aspx?isbn=0672329220&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;&lt;font size="2"&gt;&lt;strong&gt;&lt;span class="Book_Title"&gt;&amp;quot;Hitchhiker's Guide to Microsoft SQL Server 2005 Compact Edition&amp;quot;&lt;/span&gt;             &lt;br /&gt;&lt;/strong&gt;For desktop developers diving into SQL Compact, the e-book by Bill Vaughn is an excellent introduction, which covers many aspects and pitfalls of developing with SQL Compact edition in a desktop application. &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;a href="http://www.hitchhikerguides.net/EBooks/5582.aspx" target="_blank"&gt;http://www.hitchhikerguides.net/EBooks/5582.aspx&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font size="2" face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&amp;#160;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;span class="237475214-23102007"&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-327526451423623898?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/gA0p0UincOk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/gA0p0UincOk/sql-server-compact-edition-2005-books.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2007/10/sql-server-compact-edition-2005-books.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-7293475368813534423</guid><pubDate>Mon, 03 Oct 2011 15:43:00 +0000</pubDate><atom:updated>2011-11-18T19:19:03.290+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Server Compact Edition</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>Comparison of SQL Server Compact, SQL Server Express 2008 R2 and LocalDB</title><description>&lt;p&gt;Now that SQL Server Compact 4 &lt;a href="http://erikej.blogspot.com/2011/01/sql-server-compact-40-released.html" target="_blank"&gt;has been released&lt;/a&gt;, some developers are curious about the differences between SQL Server Compact 4.0 and SQL Server Express 2008 R2.&lt;/p&gt;  &lt;p&gt;I have updated the comparison table from the excellent discussion of the differences between Compact 3.5 and Express 2005 &lt;a href="http://www.google.dk/url?sa=t&amp;amp;source=web&amp;amp;cd=3&amp;amp;ved=0CCoQFjAC&amp;amp;url=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2FA%2F4%2F7%2FA47B7B0E-976D-4F49-B15D-F02ADE638EBE%2FCompact_Express_Comparison.doc&amp;amp;ei=V-E2Tf_HEYWZOoyAhZUE&amp;amp;usg=AFQjCNFcAoUHWYc8aPK7Il7mvd3swgOL-A" target="_blank"&gt;here&lt;/a&gt; to reflect the changes in the newer versions of each product.&lt;/p&gt;  &lt;p&gt;Information about LocalDB comes from &lt;a href="http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx" target="_blank"&gt;here&lt;/a&gt; and “Denali” CTP3 Books Online. LocalDB is the full SQL Server Express engine, but invoked directly from the client provider. It does not support Fulltext Search, and I doubt it support Merge Replication. It is a replacement of the current “User Instance” feature in SQL Server Express.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Updated data on LocalDB, based on additional information and feedback from the LocalDB Program Manager.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;&lt;b&gt;Feature&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;SQL Server Compact 3.5 SP2&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="97"&gt;         &lt;p&gt;SQL Server Compact 4.0&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="73"&gt;         &lt;p&gt;SQL Server            &lt;br /&gt;Express 2008 R2&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;SQL Server ”Denali” LocalDB&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;&lt;b&gt;Deployment/Installation Features&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td width="97"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td width="73"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td valign="top" width="105"&gt;&amp;nbsp;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Installation size&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;2.5 MB download size            &lt;br /&gt;12 MB expanded on disk&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;2.5 MB download size            &lt;br /&gt;18 MB expanded on disk&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;74 MB download size            &lt;br /&gt;&amp;gt; 300 MB expanded on disk&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;32 MB download size            &lt;br /&gt;&amp;gt; 160 MB on disk (TBD)&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;ClickOnce deployment &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Privately installed, embedded, with the application&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Non-admin installation option&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Runs under ASP.NET&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Runs on Windows Mobile / Windows Phone platform&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Installed centrally with an MSI&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Runs in-process with application&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No (as process started by app)&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;64-bit support&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Runs as a service&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No – In process with application&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No - In process with application&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No – as launched process&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="237"&gt;         &lt;p&gt;&lt;b&gt;Data file features&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td width="97"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td width="73"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td valign="top" width="105"&gt;&amp;nbsp;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;File format&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Single file&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Single file &lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Multiple files &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Multiple files&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Data file storage on a network share&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Support for different file extensions&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Database size support&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;4 GB&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;4 GB&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;10 GB&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;10 GB&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;XML storage&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes – stored as ntext&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes - stored as ntext &lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Binary (BLOB) storage&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes – stored as image&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes - stored as image&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;FILESTREAM support&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No &lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Code free, document safe, file format&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="237"&gt;         &lt;p&gt;&lt;b&gt;Programmability&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td width="97"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td width="73"&gt;&amp;nbsp;&lt;/td&gt;        &lt;td valign="top" width="105"&gt;&amp;nbsp;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Transact-SQL - Common Query Features&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Procedural T-SQL - Select Case, If, features&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Remote Data Access (RDA)&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No (&lt;a href="http://erikej.blogspot.com/2011/03/snapshot-synchronization-with-sql.html"&gt;not supported&lt;/a&gt;)&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;ADO.NET Sync Framework&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;LINQ to SQL&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;ADO.NET Entity Framework 4.1&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes (no Code First)&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Subscriber for merge replication&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Simple transactions&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Distributed transactions &lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Native XML, XQuery/XPath&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Stored procedures, views, triggers&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Role-based security&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;No&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;         &lt;p&gt;Yes&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="237"&gt;         &lt;p&gt;Number of concurrent connections&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="132"&gt;         &lt;p&gt;256 (100)&lt;/p&gt;       &lt;/td&gt;        &lt;td width="97"&gt;         &lt;p&gt;256&lt;/p&gt;       &lt;/td&gt;        &lt;td width="73"&gt;         &lt;p&gt;Unlimited&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="105"&gt;Unlimited (but only local)&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;There is also a table &lt;a href="http://msdn.microsoft.com/en-us/library/bb896140.aspx" target="_blank"&gt;here&lt;/a&gt; that allows you to determine which Transact-SQL commands, features, and data types are supported by SQL Server Compact 3.5 (which are the same a 4.0 with very few exceptions), compared with SQL Server 2005 and 2008. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-7293475368813534423?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/UPW6KkpwT7o" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/UPW6KkpwT7o/comparison-of-sql-server-compact-4-and.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>8</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/01/comparison-of-sql-server-compact-4-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-797709176298573435</guid><pubDate>Fri, 30 Sep 2011 17:40:00 +0000</pubDate><atom:updated>2011-09-30T19:42:05.911+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SSMS</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>Analyzing SQL Server Compact queries using Visual Studio 2010 Premium/Ultimate</title><description>&lt;p&gt;f you are the happy owner of Visual Studio 2010 Premium or Ultimate, there is a hidden tool that allows you to run and analyze queries against SQL Server Compact 3.5 and 4.0 databases. (Support for 4.0 requires &lt;a href="http://erikej.blogspot.com/2011/01/sql-server-compact-40-released.html" target="_blank"&gt;Visual Studio 2010 SP1 + the SQL Server Compact Tools update&lt;/a&gt;). This blog post will walk through how to access and use this “hidden” tool.&lt;/p&gt;  &lt;p&gt;NOTE: If you only have Visual Studio Professional, you can use my SQL Server Compact Toolbox in combination with the free &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=22985" target="_blank"&gt;SQL Server 2008 R2 Management Studio Express&lt;/a&gt; to perform similar query analysis.&lt;/p&gt;  &lt;p&gt;To access the tool, go to the Data menu, and select Transact-SQL Editor, New Query Connection… (The tool is part of the so-called “Data Dude” features)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-ku5hiSZKS0w/ToX_WlRZAVI/AAAAAAAAAlY/nYc9lMuB9kA/s1600-h/clip_image002%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh3.ggpht.com/-CGX7FmpBv1I/ToX_XKM12EI/AAAAAAAAAlc/mOOeOjqX3JI/clip_image002_thumb%25255B1%25255D.jpg?imgmax=800" width="441" height="146" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the Connect to Server dialog, select SQL Server Compact:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-ZtpY08a9sWc/ToX_XxOosqI/AAAAAAAAAlg/4RdXyKczox8/s1600-h/clip_image004%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh6.ggpht.com/-m0702Mi5w2U/ToX_YV6z7UI/AAAAAAAAAlk/jEhyTUD5JH0/clip_image004_thumb%25255B1%25255D.jpg?imgmax=800" width="369" height="293" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can select an existing database, or even create a new one. This dialog will automatically detect if the specified file is a version 3.5 or 4.0 file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-wR0czGl1cOY/ToX_Y8dCBoI/AAAAAAAAAlo/dxQrpLIWVgE/s1600-h/clip_image006%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://lh4.ggpht.com/-DfcYaS02O8c/ToX_Ze2N8eI/AAAAAAAAAls/KZq9s1Ial3U/clip_image006_thumb%25255B1%25255D.jpg?imgmax=800" width="381" height="302" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once connected, you can perform functions similar to what you may know from SQL Server Management Studio:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-nDR_hOqlFCI/ToX_ZwlW3CI/AAAAAAAAAlw/HcCvtw2IVBQ/s1600-h/clip_image008%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://lh5.ggpht.com/-I_TsatUaQwY/ToX_aXEOIOI/AAAAAAAAAl0/ipHVYmuybEU/clip_image008_thumb%25255B1%25255D.jpg?imgmax=800" width="416" height="215" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-3GYSPfV8dfo/ToX_a-EY81I/AAAAAAAAAl4/95aRkSwg5sI/s1600-h/clip_image010%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://lh6.ggpht.com/-41jFQcjRyQE/ToX_bdMPfQI/AAAAAAAAAl8/lTx2FYbYibA/clip_image010_thumb%25255B1%25255D.jpg?imgmax=800" width="419" height="270" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-797709176298573435?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/WvsRa6FKZKQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/WvsRa6FKZKQ/analyzing-sql-server-compact-queries.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-CGX7FmpBv1I/ToX_XKM12EI/AAAAAAAAAlc/mOOeOjqX3JI/s72-c/clip_image002_thumb%25255B1%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/09/analyzing-sql-server-compact-queries.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-4116147049854694653</guid><pubDate>Thu, 22 Sep 2011 17:38:00 +0000</pubDate><atom:updated>2011-09-22T19:38:24.277+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact Toolbox available for Visual Studio 11</title><description>&lt;p&gt;Visual Studio 11 Developer Preview is &lt;a href="http://msdn.microsoft.com/en-US/vstudio/hh127353" target="_blank"&gt;now available&lt;/a&gt; for testing. As one of the first third party add-ins, a build of the SQL Server Compact Toolbox version 2.4 that supports this Visual Studio Preview version is available via Extension Manager or in the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/" target="_blank"&gt;Visual Studio Gallery&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-y9B8qv03VVU/Tntyh48pQ4I/AAAAAAAAAlI/uFTYlv9eDtU/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-N9MkSZ0WElE/TntyisW-API/AAAAAAAAAlM/WBYoOrHNHKI/image_thumb%25255B1%25255D.png?imgmax=800" width="461" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In order to add support for Visual Studio version 11 in an existing add-in, all you need to do is modify the source.extension.vsixmanifest file as shown below:&lt;/p&gt;  &lt;pre class="code"&gt;    &lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;SupportedProducts&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;VisualStudio &lt;/span&gt;&lt;span style="color: red"&gt;Version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;10.0&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Edition&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Pro&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Edition&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;VisualStudio&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;VisualStudio &lt;/span&gt;&lt;span style="color: red"&gt;Version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;11.0&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Edition&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Pro&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Edition&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;VisualStudio&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;SupportedProducts&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The result of this change is that the add-in can now be installed for several versions of Visual Studio. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-6nhjlkNODMI/TntyjMny1AI/AAAAAAAAAlQ/k_I2ApTxx04/s1600-h/image7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-4umhKLwqJlU/Tntyj2MGuGI/AAAAAAAAAlU/fTDgPVGV_2U/image_thumb2.png?imgmax=800" width="422" height="340" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I have had to make some changes, as the Toolbox currently depends on SQL Server Compact 3.5 SP2 to store it’s connections, and only SQL Server Compact 4.0 is included with Visual Studio 11. In the Developer Preview the version of SQL Server Compact included is the 4.0 RTM version, so no changes there for now.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To detect which version of Visual Studio you are running, you can use the following code in your Package.cs class:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Version &lt;/span&gt;VisualStudioVersion&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;get&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;var &lt;/span&gt;dte = &lt;span style="color: blue"&gt;this&lt;/span&gt;.GetServiceHelper(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(EnvDTE.&lt;span style="color: #2b91af"&gt;DTE&lt;/span&gt;)) &lt;span style="color: blue"&gt;as &lt;/span&gt;EnvDTE.&lt;span style="color: #2b91af"&gt;DTE&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue"&gt;string &lt;/span&gt;root = dte.RegistryRoot;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(root.Contains(&lt;span style="color: #a31515"&gt;&amp;quot;10.0&amp;quot;&lt;/span&gt;))&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Version&lt;/span&gt;(10, 0);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;else if &lt;/span&gt;(root.Contains(&lt;span style="color: #a31515"&gt;&amp;quot;11.0&amp;quot;&lt;/span&gt;))&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Version&lt;/span&gt;(11, 0);&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue"&gt;else&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Version&lt;/span&gt;(0, 0);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: blue"&gt;set&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;this&lt;/span&gt;.VisualStudioVersion = &lt;span style="color: blue"&gt;value&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I am currently not bringing forward any 4.0 connections defined in the VS 2010 edition of the add-in. Please let me know if a feature to import these connections to the VS 11 Server Explorer would be useful.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Also, would it be of interest to be able to manage 3.5 databases in VS 11, even though they are not supported in Server Explorer?&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As always, please provide any feedback in the comments or via the Codeplex &lt;a href="http://sqlcetoolbox.codeplex.com/workitem/list/basic" target="_blank"&gt;issue tracker&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-4116147049854694653?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/yGMj-s-r3Tc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/yGMj-s-r3Tc/sql-server-compact-toolbox-available.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-N9MkSZ0WElE/TntyisW-API/AAAAAAAAAlM/WBYoOrHNHKI/s72-c/image_thumb%25255B1%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/09/sql-server-compact-toolbox-available.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-3100741932062198751</guid><pubDate>Fri, 09 Sep 2011 17:28:00 +0000</pubDate><atom:updated>2011-09-09T19:30:18.689+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">Entity Framework</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact Toolbox 2.4–Visual Guide of new features</title><description>&lt;p&gt;After more than 50.000 downloads, version 2.4 of my &lt;a href="http://sqlcetoolbox.codeplex.com/"&gt;SQL Server Compact Toolbox&lt;/a&gt; extension for Visual Studio 2010 is now &lt;a href="http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/"&gt;available for download&lt;/a&gt;. This blog post is a visual guide to the new features included in this release.    &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;Edit Table Data (beta)&lt;/h3&gt;  &lt;p&gt;The tools that are included with Server Explorer for SQL Server Compact 3.5 and 4.0 already include a feature to edit table data, called Show Table Data:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-jWURd1ibd9k/TmpNFOx5gKI/AAAAAAAAAkg/7WjXV_gLNDw/s1600-h/clip_image002%25255B5%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh5.ggpht.com/-b5F6HjG6MrU/TmpNFpM4PWI/AAAAAAAAAkk/7qpDWjXoe7s/clip_image002_thumb%25255B2%25255D.jpg?imgmax=800" width="288" height="274" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;But the grid has some limitations that I have lifted on the new “Edit Table Data” feature:&lt;/p&gt;  &lt;p&gt;- Ability to sort data by clicking a column heading&lt;/p&gt;  &lt;p&gt;- Ability to Import/Export/Delete content of image columns&lt;/p&gt;  &lt;p&gt;- Ability to locate data in a column (QuickSearch)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-_95VxyHM3gg/TmpNGOAs18I/AAAAAAAAAko/cIvhj7Vd5VU/s1600-h/clip_image004%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh6.ggpht.com/-X82nuVTZBrg/TmpNG6Y8XiI/AAAAAAAAAks/o57MMRccim0/clip_image004_thumb%25255B1%25255D.jpg?imgmax=800" width="454" height="220" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;Split Windows Phone DataContext into multiple files&lt;/h3&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;You can now select to have the Windows Phone DataContext generated as a DataContext class file, and a class file per table in your database.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-sPL4hdjLFic/TmpNHcmuenI/AAAAAAAAAkw/0zF2HBRvjoQ/s1600-h/clip_image006%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://lh5.ggpht.com/-Ybx6holFoAU/TmpNHxGfvWI/AAAAAAAAAk0/ll7BfA2tiG4/clip_image006_thumb%25255B1%25255D.jpg?imgmax=800" width="431" height="312" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Select tables to include in Entity Data Model&lt;/h3&gt;  &lt;p&gt;You can now select which tables to include in the Entity Data Model created from your SQL Server Compact database. (Thanks to the &lt;a href="http://wpftoolkit.codeplex.com/"&gt;Extended WPF Toolkit Project&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-HBcTHoYVf6c/TmpNInhCFjI/AAAAAAAAAk4/tGiOwan5CvU/s1600-h/clip_image008%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://lh4.ggpht.com/-yqiuEKGJbBw/TmpNJK2hnAI/AAAAAAAAAk8/4weyYY1QaS4/clip_image008_thumb%25255B1%25255D.jpg?imgmax=800" width="419" height="428" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;h3&gt;Explore and script primary and foreign keys&lt;/h3&gt;  &lt;p&gt;The tree view now lists the primary and foreign keys belonging to a table, and it is also possible to script these individually.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-v39J1AHz_24/TmpNJuHsfcI/AAAAAAAAAlA/EfWeG3TJ_Xw/s1600-h/clip_image010%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://lh3.ggpht.com/-u3gyogfMSPk/TmpNKZwzjiI/AAAAAAAAAlE/N_AH7HWuRdk/clip_image010_thumb%25255B1%25255D.jpg?imgmax=800" width="361" height="355" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;   &lt;br /&gt;Other fixes&lt;/h3&gt;  &lt;p&gt;Improved Add-in Update detection (for users behind proxies)   &lt;br /&gt;Improved handling of password protected files for non-English SQL Compact runtime    &lt;br /&gt;Some icons were not transparent    &lt;br /&gt;CreateDataIfExists (Windows Phone DataContext) now returns bool if database was created    &lt;br /&gt;Latest scripting library, with fix for missing SET IDENTITY INSERT with multiple files (from large tables)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-3100741932062198751?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/EnuhXPLCOcw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/EnuhXPLCOcw/sql-server-compact-toolbox-24visual.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-b5F6HjG6MrU/TmpNFpM4PWI/AAAAAAAAAkk/7qpDWjXoe7s/s72-c/clip_image002_thumb%25255B2%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/09/sql-server-compact-toolbox-24visual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-867583004764199277</guid><pubDate>Mon, 05 Sep 2011 17:33:00 +0000</pubDate><atom:updated>2011-09-05T19:34:03.395+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Useful Windows Phone advice from Nick Randolph</title><description>&lt;p&gt;Fellow MVP Nick Randolph (&lt;a href="https://twitter.com/#!/btroam"&gt;@BTRoam&lt;/a&gt;) publishes an excellent blog, &lt;a href="http://nicksnettravels.builttoroam.com/"&gt;Nick’s .NET Travels&lt;/a&gt;, often with articles that relate to SQL Server Compact and synchronization technologies, but also very useful articles for any Windows Phone developer, with a practical, hands-on approach. Highly recommended.&lt;/p&gt;  &lt;p&gt;He has recently published the following articles:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nicksnettravels.builttoroam.com/post/2011/09/04/Windows-Phone-LINQ-to-SQL-and-the-INotifyPropertyChanged-and-INotifyPropertyChanging-Interfaces.aspx"&gt;Windows Phone LINQ to SQL and the INotifyPropertyChanged and INotifyPropertyChanging Interfaces&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article demonstrates the importance of implementing the INotifyPropertyChanging interface on your DataContext classes to improve memory management. As he points out, you should use SQLMetal to generate your DataContext, as this will avoid missing to implement these interfaces. Or even better use the &lt;a href="http://sqlcetoolbox.codeplex.com/"&gt;SQL Server Compact Toolbox Visual Studio add-in&lt;/a&gt;, as it adds the following features on top of SQLMetal:&lt;/p&gt;  &lt;p&gt;1. Removes unneeded/unsupported constructors&lt;/p&gt;  &lt;p&gt;2. Adds any [Index] attributes to each table&lt;/p&gt;  &lt;p&gt;3. Adds the CreateDatabaseIfExists method&lt;/p&gt;  &lt;p&gt;4. Optionally splits the generated files into a file per table (in next version (2.4), currently &lt;a href="http://sqlcetoolbox.codeplex.com/releases/view/71596" target="_blank"&gt;available in beta&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nicksnettravels.builttoroam.com/post/2011/08/14/Change-Tracking-with-SQL-Server-Compact-(LINQ-to-SQL)-on-Windows-Phone.aspx"&gt;Change Tracking with SQL Server Compact (LINQ to SQL) on Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article demonstrates how to get started using SQL Server Compact Change Tracking with a Windows Phone SQL Server Compact database, despite the fact that the Change Tracking APIs are not available on Windows Phone. He also gets thrown in how to use the Windows Phone SDK ISETool to move the database from the Phone (Emulator) to your local disk. Good stuff.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-867583004764199277?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/1co_iJVBxik" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/1co_iJVBxik/useful-windows-phone-advice-from-nick.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/09/useful-windows-phone-advice-from-nick.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-6264401841767373334</guid><pubDate>Thu, 01 Sep 2011 19:27:00 +0000</pubDate><atom:updated>2011-09-01T21:27:44.143+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">ASP.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SqlCeBulkCopy, a library for fast SQL Server Compact INSERTS released</title><description>&lt;p&gt;Version 2.1 of my SQL Server Compact &lt;a href="http://sqlcebulkcopy.codeplex.com/"&gt;Bulk Insert Library&lt;/a&gt; has now been released. This library exposes an API similar to the &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx"&gt;SqlBulkCopy API&lt;/a&gt; implemented for the SqlClient (working against SQL Server). The library allows you to quickly load data inot a SQL Server Compact database.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-EPU2iRzt0VI/Tl_coH89rCI/AAAAAAAAAj8/Kyckc7GNCjQ/s1600-h/clip_image002%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh3.ggpht.com/-7JiTCTy9bY8/Tl_co5EAoVI/AAAAAAAAAkA/xXUr5y87aYg/clip_image002_thumb%25255B1%25255D.jpg?imgmax=800" width="410" height="329" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;New features in this release include:&lt;/p&gt;  &lt;p&gt;3 editions of the library:   &lt;br /&gt;One for .NET Compact Framework for version 3.5 databases - ErikEJ.SqlCe.NetCF.dll    &lt;br /&gt;One for full .NET Framework for version 3.5 databases - ErikEJ.SqlCe.dll    &lt;br /&gt;One for full .NET Framework for version 4.0 databases - ErikEJ.SqlCe40.dll&lt;/p&gt;  &lt;p&gt;- New overloads of the WriteToServer method allows you to load any .NET list that implements IEnumerable or IEnumerable&amp;lt;T&amp;gt;&lt;/p&gt;  &lt;p&gt;- API Documentation is now available in HTML format &lt;a href="http://sqlcebulkcopy.codeplex.com/documentation"&gt;here.&lt;/a&gt; The API documentation was created very easily using the open source &lt;a href="http://immdocnet.codeplex.com/"&gt;ImmDoc.NET&lt;/a&gt; utility. All this command line utility requires is XML comments file and the DLL file(s).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-tiU2SeCmWCo/Tl_cpvH39LI/AAAAAAAAAkE/Hstr7dB6nXw/s1600-h/clip_image004%25255B6%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh3.ggpht.com/-KOyodmUsMdY/Tl_cqRRqfZI/AAAAAAAAAkI/5Ad27Ud5Z-I/clip_image004_thumb%25255B3%25255D.jpg?imgmax=800" width="483" height="785" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;- NuGet package available&lt;/p&gt;  &lt;p&gt;A &lt;a href="http://nuget.org/List/Packages/ErikEJ.SqlCeBulkCopy" target="_blank"&gt;NuGet package&lt;/a&gt;, that includes the SQL Server Compact 4.0 library is now available via the NuGet Package Manager.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-RF3KAjyqhSc/Tl_crIXW8mI/AAAAAAAAAkM/2Q0uI-oV9aA/s1600-h/clip_image006%25255B4%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://lh3.ggpht.com/-iIaWp-1z7-8/Tl_cr0dUm5I/AAAAAAAAAkQ/lwH7akHYKXU/clip_image006_thumb%25255B1%25255D.jpg?imgmax=800" width="435" height="261" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you need to load data fast from a DataTable, DataReader or .NET List to a SQL Server Compact database file, this is the library for you.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-6264401841767373334?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/DVsCAmDQpsM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/DVsCAmDQpsM/sqlcebulkcopy-library-for-fast-sql.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-7JiTCTy9bY8/Tl_co5EAoVI/AAAAAAAAAkA/xXUr5y87aYg/s72-c/clip_image002_thumb%25255B1%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/09/sqlcebulkcopy-library-for-fast-sql.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-6888788781216168063</guid><pubDate>Mon, 15 Aug 2011 15:35:00 +0000</pubDate><atom:updated>2011-08-15T17:35:19.632+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Merge Replication</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>Major update to SQL Server Compact 3.5 SP2 available</title><description>&lt;p&gt;A major update to SQL Server Compact 3.5 SP2 has just been released, disguised as a “Cumulative Update Package”. Microsoft knowledgebase article &lt;a href="http://support.microsoft.com/kb/2553608" target="_blank"&gt;2553608&lt;/a&gt; describes the update. The update contains the following product enhancements:&lt;/p&gt;  &lt;h3&gt;Support for Windows Embedded CE 7.0&lt;/h3&gt;  &lt;p&gt;The update contains updated device components. This expand the supported device platforms to this impressive list: Pocket PC 2003 Software, Windows CE, Windows Mobile 5.0, Windows Mobile 6, Windows Mobile 6.1 , Windows Mobile 6.5 Professional, Windows Mobile 6.5 Standard, &lt;strong&gt;Windows Embedded CE 7.0&lt;/strong&gt;&lt;/p&gt;  &lt;h3&gt;Support for Merge Replication with SQL Server “Denali” CTP3&lt;/h3&gt;  &lt;p&gt;The update contains new Server Tools, that support Merge Replication with the next version of SQL Server, codename “Denali”. The replication components also work with Windows Embedded CE 7.0.&lt;/p&gt;  &lt;p&gt;For a list of fixes in the Cumulative Updates released for SQL Server Compact 3.5 SP2, see my &lt;a href="http://erikej.blogspot.com/2010/08/sql-server-compact-35-sp2-downloadable.html" target="_blank"&gt;blog post here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is nice to see that the 3.5 SP2 product, with it’s full range of device support and synchronization technologies is kept alive and kicking. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;Currently, the only download available is the desktop runtime, I will update this blog post and tweet (@ErikEJ) when the other downloads are available.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-6888788781216168063?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/27d1iKuDtWA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/27d1iKuDtWA/major-update-to-sql-server-compact-35.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/08/major-update-to-sql-server-compact-35.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-5611564666269764349</guid><pubDate>Thu, 11 Aug 2011 15:28:00 +0000</pubDate><atom:updated>2011-08-11T17:28:16.508+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">Entity Framework</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>Viewing SQL statements created by Entity Framework with SQL Server Compact</title><description>&lt;p&gt;Sometimes it can be useful to be able to inspect the SQL statements generated by Entity Framework against your SQL Server Compact database. This can easily be done for SELECT statements as noted &lt;a href="http://stackoverflow.com/questions/2659249/how-to-log-entity-framework-sql" target="_blank"&gt;here.&lt;/a&gt; But for INSERT/UPDATE/DELETE this method will not work. This is usually not a problem for SQL Server based applications, as you can use SQL Server Profiler to log all SQL statements executed by an application, but this is not possible with SQL Server Compact.    &lt;br /&gt;    &lt;br /&gt;This &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/2a50ffd2-ed73-411d-82bc-c9c564623cb4/" target="_blank"&gt;forum thread&lt;/a&gt; contains an extension method, that allows you to log INSERT/UPDATE/DELETE statements before SaveChanges is called on the ObjectContext. I have updated and fixed the code to work with SQL Server Compact 4.0, and it is available in the updated Chinook sample available below in the ObjectQueryExtensions class in the Chinook.Data project.&lt;/p&gt;  &lt;p&gt;You can now use code like the following to inspect an INSERT statement:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;context = &lt;span style="color: blue"&gt;new &lt;/span&gt;Chinook.Model.&lt;span style="color: #2b91af"&gt;ChinookEntities&lt;/span&gt;())&lt;br /&gt;{ &lt;br /&gt;    context.Artists.AddObject(&lt;span style="color: blue"&gt;new &lt;/span&gt;Chinook.Model.&lt;span style="color: #2b91af"&gt;Artist &lt;/span&gt;{ ArtistId = &lt;span style="color: #2b91af"&gt;Int32&lt;/span&gt;.MaxValue, Name = &lt;span style="color: #a31515"&gt;&amp;quot;ErikEJ&amp;quot; &lt;/span&gt;});&lt;br /&gt;    string&lt;span style="color: blue"&gt; &lt;/span&gt;sql = context.ToTraceString();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The “sql” string variable now contains the following text:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="Courier New"&gt;--=============== BEGIN COMMAND ===============&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="Courier New"&gt;declare @0 NVarChar set @0 = 'ErikEJ'&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="Courier New"&gt;insert [Artist]([Name]) &lt;br /&gt;    &lt;br /&gt;values (@0) &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;; select [ArtistId] &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;from [Artist] &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;where [ArtistId] = @@IDENTITY&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="Courier New"&gt;go&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="Courier New"&gt;--=============== END COMMAND ===============&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This statement reveals some of the magic behind the new support for “server generated” keys with SQL Server Compact 4.0 when used with Entity Framework 4.0. SQL Server Compact is “tricked” into executing multiple statements in a single call.&lt;/p&gt;&lt;br /&gt;&lt;iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="https://skydrive.live.com/embedicon.aspx/SQL%20Compact/Chinook/ChinookEFLog.zip?cid=47e59e4beb70472b&amp;amp;sc=documents" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-5611564666269764349?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/pGmVXFbiRr4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/pGmVXFbiRr4/viewing-sql-statements-created-by.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/08/viewing-sql-statements-created-by.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-7953150258167470952</guid><pubDate>Sun, 07 Aug 2011 10:09:00 +0000</pubDate><atom:updated>2011-08-07T12:10:25.269+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact Toolbox 2.3–Visual Guide of new features</title><description>&lt;p&gt;After more than 44.000 downloads, version 2.3 of my &lt;a href="http://sqlcetoolbox.codeplex.com/"&gt;SQL Server Compact Toolbox&lt;/a&gt; extension for Visual Studio 2010 is now &lt;a href="http://visualstudiogallery.msdn.microsoft.com/0e313dfd-be80-4afb-b5e9-6e74d369f7a1/"&gt;available for download&lt;/a&gt;. This blog post is a visual guide to the new features included in this release &lt;/p&gt;  &lt;h3&gt;Generate database documentation&lt;/h3&gt;  &lt;p&gt;This feature allows you to create documentation of all tables and columns in your database, in HTML or XML (raw) format, for use with product documentation etc. If you have added descriptions to database, table or column, these will also be included.&lt;/p&gt;  &lt;p&gt;From the database context menu, select Create Database Documentation…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-OLRfnlKPZ-A/Tj5kdGYuK9I/AAAAAAAAAjU/xcQxtb7_zjI/s1600-h/clip_image0024.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh6.ggpht.com/-Jsa4VigIUUM/Tj5kefRya2I/AAAAAAAAAjY/0Gge8_csM9E/clip_image002_thumb1.jpg?imgmax=800" width="411" height="57" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You will be prompted for a filename and can choose between HTML and XML format. The generated document will then open in the associated application (for example your browser).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-v6tdE0z74i8/Tj5ke8O709I/AAAAAAAAAjc/yIu5cw-MdaU/s1600-h/clip_image0045.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh4.ggpht.com/-NLzbC3nMLY0/Tj5kfsJDdJI/AAAAAAAAAjg/_t9W6aqppR0/clip_image004_thumb2.jpg?imgmax=800" width="379" height="525" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The format of the HTML and XML file comes from the excellent &lt;a href="http://sqldbdoc.codeplex.com/"&gt;DB&amp;gt;doc for Microsoft SQL Server&lt;/a&gt; CodePlex project. You can use the XML file as the data in your own documentation format.&lt;/p&gt;  &lt;p&gt;By default, tables beginning with __ are not included in the documentation (this includes the table with object descriptions). They can optionally be included via a new option:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-haeez3A5e4k/Tj5kgH5MbhI/AAAAAAAAAjk/aExhFiWG4Og/s1600-h/clip_image0064.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://lh4.ggpht.com/-YqLz3bhsjeM/Tj5khaRIjfI/AAAAAAAAAjo/-3bPii6P8FY/clip_image006_thumb1.jpg?imgmax=800" width="398" height="199" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please provide any feedback for this new feature to the &lt;a href="http://sqlcetoolbox.codeplex.com/workitem/list/basic"&gt;CodePlex issue tracker&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Handle password protected files better&lt;/h3&gt;  &lt;p&gt;When trying to open a password protected file, where the password is not saved with the connection string, you are now prompted to enter the database password, instead of being faced with an error.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-P9KRVQ9urrQ/Tj5khoVTC_I/AAAAAAAAAjs/0PWimnNw9jA/s1600-h/clip_image0084.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://lh3.ggpht.com/-vf7rbU42T3E/Tj5kjPgk4gI/AAAAAAAAAjw/u5TQbCe8PKM/clip_image008_thumb1.jpg?imgmax=800" width="326" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Show result count in status bar&lt;/h3&gt;  &lt;p&gt;The query editor status bar now displays the number of rows returned.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-8WyQ7feFHYQ/Tj5kjggnwyI/AAAAAAAAAj0/4UOjt-kyve4/s1600-h/clip_image0104.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://lh3.ggpht.com/-4KAeJSv1p0o/Tj5kkJtsDfI/AAAAAAAAAj4/vJqnV3rl4Qw/clip_image010_thumb1.jpg?imgmax=800" width="353" height="365" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Other fixes&lt;/h3&gt;  &lt;p&gt;Improvements to Windows Phone DataContext generation, improved error handling to prevent Visual Studio crashes, and the latest scripting libraries included.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-7953150258167470952?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/x8Z-T97eKg4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/x8Z-T97eKg4/sql-server-compact-toolbox-23visual.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-Jsa4VigIUUM/Tj5kefRya2I/AAAAAAAAAjY/0Gge8_csM9E/s72-c/clip_image002_thumb1.jpg?imgmax=800" height="72" width="72" /><thr:total>8</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/08/sql-server-compact-toolbox-23visual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-4582733696015192627</guid><pubDate>Wed, 13 Jul 2011 08:30:00 +0000</pubDate><atom:updated>2011-07-13T10:33:06.803+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">PowerShell</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>Using PowerShell to manage SQL Server Compact database files</title><description>&lt;p&gt;I noticed that someone asked if you could manage SQL Server Compact from PowerShell, and yes you can, based on the reply &lt;a href="http://powershell.com/cs/forums/p/6927/11305.aspx" target="_blank"&gt;here&lt;/a&gt; I put together the following sample:&lt;/p&gt;  &lt;p&gt;[Reflection.Assembly]::LoadFile(“C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll”)&lt;/p&gt;  &lt;p&gt;$connString = &amp;quot;Data Source=C:\data\sqlce\test\roads.sdf&amp;quot;   &lt;br /&gt;$cn = new-object &amp;quot;System.Data.SqlServerCe.SqlCeConnection&amp;quot; $connString&lt;/p&gt;  &lt;p&gt;# create the command   &lt;br /&gt;$cmd = new-object &amp;quot;System.Data.SqlServerCe.SqlCeCommand&amp;quot;    &lt;br /&gt;$cmd.CommandType = [System.Data.CommandType]&amp;quot;Text&amp;quot;    &lt;br /&gt;$cmd.CommandText = &amp;quot;SELECT TOP (100) * FROM Road&amp;quot;    &lt;br /&gt;$cmd.Connection = $cn&lt;/p&gt;  &lt;p&gt;#get the data   &lt;br /&gt;$dt = new-object &amp;quot;System.Data.DataTable&amp;quot;&lt;/p&gt;  &lt;p&gt;$cn.Open()   &lt;br /&gt;$rdr = $cmd.ExecuteReader()&lt;/p&gt;  &lt;p&gt;$dt.Load($rdr)   &lt;br /&gt;$cn.Close()&lt;/p&gt;  &lt;p&gt;$dt | Out-Default | Format-Table   &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-4582733696015192627?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/e3l3ilkTZ4U" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/e3l3ilkTZ4U/using-powershell-to-manage-sql-server.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>0</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/07/using-powershell-to-manage-sql-server.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-5550924060727578475</guid><pubDate>Sun, 03 Jul 2011 19:18:00 +0000</pubDate><atom:updated>2012-01-28T13:56:45.356+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows Phone</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><title>Windows Phone / SQL Server Compact resources</title><description>&lt;p&gt;This blog post collects links to relevant blog posts and articles about Windows Phone support for SQL Server Compact. You can also follow me on Twitter (@ErikEJ) to get notified of any SQL Server Compact related news.&lt;/p&gt;  &lt;h2&gt;MSDN&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh202860(v=VS.92).aspx" target="_blank"&gt;Local Database Overview for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh202876(v=VS.92).aspx" target="_blank"&gt;How to: Create a Basic Local Database Application for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh286405(v=VS.92).aspx" target="_blank"&gt;How to: Create a Local Database Application with MVVM for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh286411(v=VS.92).aspx" target="_blank"&gt;How to: Deploy a Reference Database with a Windows Phone Application&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh394022(v=VS.92).aspx" target="_blank"&gt;Walkthrough: Updating a Local Database Application for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh286406(v=VS.92).aspx" target="_blank"&gt;Local Database Best Practices for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh202861(v=VS.92).aspx" target="_blank"&gt;Local Database Connection Strings for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh394018(v=VS.92).aspx" target="_blank"&gt;Local Database Migration Overview for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh202872(v=VS.92).aspx" target="_blank"&gt;LINQ to SQL Support for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Video: &lt;a href="http://uktechdays.cloudapp.net/techdays-live/sql-server-compact-and-user-data-access-in-mango.aspx" target="_blank"&gt;SQL Server Compact and User Data Access in Mango&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;PowerPoint slides: &lt;a href="http://bit.ly/lYUQ31" target="_blank"&gt;SQL Server Compact and User Data Access in Mango&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Video + PPT: &lt;a href="http://channel9.msdn.com/events/MIX/MIX11/DVC12" target="_blank"&gt;New Data Access Features Coming to Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://borntolearn.mslearn.net/wpmango/m/mediagallery/363084.aspx" target="_blank"&gt;Windows Phone Mango Application Storage Jumpstart PDF&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/Series/Get-to-Mango/Get-to-Mango-8-Using-a-Local-Database" target="_blank"&gt;Get to Mango #8 - Using a Local Database&lt;/a&gt; (Screencast)&lt;/p&gt;  &lt;h2&gt;ErikEJ&lt;/h2&gt;  &lt;p&gt;&lt;a title="Populating a Windows Phone “Mango” SQL Server Compact database on desktop" href="http://erikej.blogspot.com/2011/06/populating-windows-phone-mango-sql.html" target="_blank"&gt;Populating a Windows Phone “Mango” SQL Server Compact database on desktop&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="SQL Server Compact Toolbox 2.2–Visual Guide of new features" href="http://erikej.blogspot.com/2011/06/sql-server-compact-toolbox-22visual.html" target="_blank"&gt;SQL Server Compact Toolbox 2.2–Visual Guide of new features&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://erikej.blogspot.com/2011/11/windows-phone-local-database-tip.html" target="_blank"&gt;Windows Phone Local Database tip: Viewing the SQL generated by LINQ to SQL&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://erikej.blogspot.com/2011/12/windows-phone-local-database-tip-batch.html" target="_blank"&gt;Windows Phone Local Database tip: Batch INSERT performance&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://erikej.blogspot.com/2011/12/windows-phone-local-database-tip.html" target="_blank"&gt;Windows Phone Local Database tip: Exploring INSERT performance–5 power tweaks&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://erikej.blogspot.com/2012/01/generating-linq-to-sql-datacontext-with.html" target="_blank"&gt;Generating a LINQ to SQL DataContext for VS Express for Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://erikej.blogspot.com/2012/01/windows-phone-local-database-tip.html" target="_blank"&gt;Windows Phone Local Database tip: Initializing the database&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Jesse Liberty &lt;/h2&gt;  &lt;p&gt;&lt;a href="http://jesseliberty.com/2011/05/10/coming-in-mangosql-server-ce/" target="_blank"&gt;Coming in Mango–Sql Server CE&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a title="Permalink to Coming In Mango–Local DB Part 2- Relationships" href="http://jesseliberty.com/2011/05/13/coming-in-mangolocal-db-part-2-relationships/"&gt;Coming In Mango–Local DB Part 2- Relationships&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Permalink to Best Practices For Local Databases" href="http://jesseliberty.com/2011/05/14/best-practices-for-local-databases/" target="_blank"&gt;Best Practices For Local Databases&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://jesseliberty.com/2011/07/18/yet-another-podcast-43sean-mckenna-and-windows-phone-data/" target="_blank"&gt;Yet Another Podcast #43–Sean McKenna and Windows Phone Data&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/Shows/The+Knowledge+Chamber/Sean-McKenna-and-Windows-Phone-Mango-Database-Support" target="_blank"&gt;Sean McKenna and Windows Phone &amp;quot;Mango&amp;quot; Database Support&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Rob Tiffany&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://robtiffany.com/?p=712" target="_blank"&gt;New Windows Phone Mango Data Access Features @ Tech Ed North America 2011&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Alex Golesh&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2011/05/24/windows-phone-mango-what-s-new-local-database-part-1-of-8.aspx" target="_blank"&gt;Windows Phone Mango–What’s New? (“Local Database” - Part 1 of 8)&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;h2&gt;Windows Phone Geek&lt;/h2&gt;  &lt;p&gt;&lt;a title="Windows Phone Mango Local Database- mapping and database operations" href="http://www.windowsphonegeek.com/articles/Windows-Phone-Mango-Local-Database-mapping-and-database-operations"&gt;Windows Phone Mango Local Database- mapping and database operations&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Using SqlMetal to generate Windows Phone Mango Local Database classes" href="http://www.windowsphonegeek.com/articles/Using-SqlMetal-to-generate-Windows-Phone-Mango-Local-Database-classes" target="_blank"&gt;Using SqlMetal to generate Windows Phone Mango Local Database classes&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/articles/Performance-Best-Practices-Windows-Phone-Mango-Local-Database" target="_blank"&gt;Performance Best Practices: Windows Phone Mango Local Database&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database(SQL-CE)-Introduction"&gt;Windows Phone Mango Local Database(SQL CE): Introduction&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Linq-to-SQL"&gt;Windows Phone Mango Local Database(SQL CE): Linq to SQL&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--[Table]-attribute"&gt;Windows Phone Mango Local Database(SQL CE): [Table] attribute&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Column-attribute"&gt;Windows Phone Mango Local Database(SQL CE): [Column] attribute&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Association-attribute" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): [Association] attribute&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Database-mapping" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): Database mapping&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--DataContext" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): DataContext&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Connection-Strings" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): Connection Strings&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Creating-the-Database" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): Creating the Database&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--Database-Queries-with-LINQ" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): Database Queries with LINQ&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--How-to-Insert-data" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): How to Insert data&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--How-to-Update-data" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): How to Update data&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database-SQL-CE--How-to-Delete-data" target="_blank"&gt;Windows Phone Mango Local Database(SQL CE): How to Delete data&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Arsahnt&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/05/24/distributing-a-sql-ce-database-in-a-wp7-mango-application/" target="_blank"&gt;Distributing a SQL CE database in a WP7 Mango application&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/05/25/arsanth-daily-may-25th/" target="_blank"&gt;Arsanth Daily – May 25th&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/05/27/arsanth-daily-may-27th/" target="_blank"&gt;Arsanth Daily – May 27th&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/05/30/windows-phone-sql-ce-column-inheritance/" target="_blank"&gt;Windows Phone 7 SQL CE – Column inheritance&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/05/30/windows-phone-7-sql-ce-datacontext-tables/" target="_blank"&gt;Windows Phone 7 SQL CE – DataContext Tables&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/06/02/working-with-pre-populated-sql-ce-databases-in-wp7/" target="_blank"&gt;Working with pre-populated SQL CE databases in WP7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/06/06/some-linq-to-sql-ce-performance-tips-for-wp7/" target="_blank"&gt;LINQ to SQL CE performance tips for WP7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/06/06/arsanth-daily-june-6th/" target="_blank"&gt;Arsanth Daily – June 6th&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/08/16/another-sql-ce-performance-observations/" target="_blank"&gt;Arsanth – August 16th&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/index.php/2011/08/18/arsanth-august-18th/" target="_blank"&gt;Arsanth – August 18th&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.arsanth.com/?p=953" target="_blank"&gt;How To: Log LINQ to SQL activity on WP7&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Kunal Chowdhury&lt;/h2&gt;  &lt;p&gt;&lt;a title="Windows Phone 7 (Mango) Tutorial - 22 - Local Database Support, Create DataContext" href="http://www.kunal-chowdhury.com/2011/06/windows-phone-7-mango-tutorial-22-local.html"&gt;Windows Phone 7 (Mango) Tutorial - 22 - Local Database Support, Create DataContext&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Windows Phone 7 (Mango) Tutorial - 23 - Local Database Support, Configuring Project" href="http://www.kunal-chowdhury.com/2011/06/windows-phone-7-mango-tutorial-23-local.html"&gt;Windows Phone 7 (Mango) Tutorial - 23 - Local Database Support, Configuring Project&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Windows Phone 7 (Mango) Tutorial - 24 - Local Database Support, CRUD operation with Demo" href="http://www.kunal-chowdhury.com/2011/06/windows-phone-7-mango-tutorial-24-local.html"&gt;Windows Phone 7 (Mango) Tutorial - 24 - Local Database Support, CRUD operation with Demo&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Windows Phone 7 (Mango) Tutorial - 25 - Learn about Database Connection String" href="http://www.kunal-chowdhury.com/2011/07/windows-phone-7-mango-tutorial-25-learn.html"&gt;Windows Phone 7 (Mango) Tutorial - 25 - Learn about Database Connection String&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Sergey Barskiy&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://dotnetspeak.com/index.php/2011/07/sql-ce-on-windows-phone-7-1-mango/" target="_blank"&gt;SQL CE on Windows Phone 7.1 (Mango)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotnetspeak.com/index.php/2011/07/sql-ce-in-mangoupdating-the-schema/" target="_blank"&gt;SQL CE in Mango–Updating the Schema&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Derik Whittaker&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2011/07/21/using-sql-ce-on-wp7-mango-getting-started.aspx" target="_blank"&gt;Using SQL CE on WP7 Mango–Getting Started&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2011/07/23/using-sql-ce-on-wp7-mango-working-with-associations.aspx"&gt;Using SQL CE On WP7 Mango–Working with Associations&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://devlicio.us/blogs/derik_whittaker/archive/2011/07/24/using-sql-ce-on-wp7-mango-working-with-indexes.aspx"&gt;Using SQL CE On WP7 Mango–Working with Indexes&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Mark Artega&lt;/h2&gt;  &lt;p&gt;&lt;a title="Windows Phone and Database Support" href="http://blog.markarteaga.com/WindowsPhoneAndDatabaseSupport.aspx" target="_blank"&gt;Windows Phone and Database Support&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Rabeb&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://rabeb.wordpress.com/2011/06/18/mango-baby-steps-creating-an-application-with-a-local-database/" target="_blank"&gt;Mango- Baby Steps: Creating an application with a local Database&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;JeffCren&lt;/h2&gt;  &lt;p&gt;&lt;a title="WP7 App First Run Logic" href="http://jeffcren.com/windows-phone-7/wp7-app-first-run-logic/" target="_blank"&gt;WP7 App First Run Logic&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Matt Lacey&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://blog.mrlacey.co.uk/2011/05/simplifying-use-of-sql-ce-in-mango.html" target="_blank"&gt;Simplifying use of SQL CE in Mango&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Corrado&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/corrado/archive/2011/06/05/using-local-database-in-wp7-mango.aspx" target="_blank"&gt;Using Local Database in WP7-Mango&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Max Paulousky&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.maxpaulousky.com/blog/archive/2011/07/27/windows-phone-mango-db-engines-performance-testing.aspx" target="_blank"&gt;Windows Phone (Mango) DB Engines Performance Testing&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Nick Randolph&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://nicksnettravels.builttoroam.com/post/2011/08/14/Change-Tracking-with-SQL-Server-Compact-(LINQ-to-SQL)-on-Windows-Phone.aspx" target="_blank"&gt;Change Tracking with SQL Server Compact (LINQ to SQL) on Windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nicksnettravels.builttoroam.com/post/2011/09/04/Windows-Phone-LINQ-to-SQL-and-the-INotifyPropertyChanged-and-INotifyPropertyChanging-Interfaces.aspx" target="_blank"&gt;Windows Phone LINQ to SQL and the INotifyPropertyChanged and INotifyPropertyChanging Interfaces&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://visualstudiomagazine.com/articles/2011/10/01/linq-to-sql-on-windows-phone-75.aspx" target="_blank"&gt;Understanding LINQ to SQL on Windows Phone 7.5&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Chris Sainty&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://csainty.blogspot.com/2011/08/wp75-mangocompiled-queries.html" target="_blank"&gt;WP7.5 Mango–Compiled Queries&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Anton Swanvelder&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://antonswanevelder.com/2011/10/28/writing-an-image-to-sql-ce-linq-to-sql/" target="_blank"&gt;Writing an Image to SQL CE / Linq to SQL&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Rafa Serna&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://tecnologia.rafaserna.es/en/2011/09/07/mejoras-de-rendimiento-en-entornos-sql-ce-i/" target="_blank"&gt;Performance Improvements in SQL CE environments – I&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Debug mode&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://debugmode.net/2011/09/25/local-database-application-for-windows-phone/?utm_source=dlvr.it&amp;amp;utm_medium=twitter" target="_blank"&gt;Local Database application for windows Phone&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://www.shazaml.com"&gt;&lt;font color="#000000"&gt;Shazaml Design, LLC&lt;/font&gt;&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.shazaml.com/archives/more-complete-wp7-mango-database-update-walkthrough" target="_blank"&gt;More Complete WP7 Mango Database Update Walkthrough&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Jerry Nixon&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://blog.jerrynixon.com/2011/11/mango-sample-database-part-12.html" target="_blank"&gt;Mango Sample: Database Part 1:2&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.jerrynixon.com/2011/11/mango-sample-database-part-22.html" target="_blank"&gt;Mango Sample: Database Part 2:2&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.jerrynixon.com/2011/11/in-recent-posts-i-discussed-two-ways-to.html" target="_blank"&gt;Mango Sample: SQL Toolbox&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.livestream.com/microsoftdevelopers/video?clipId=pla_f1471ce7-bb2b-4dfa-be18-737a9f8e4b6d&amp;amp;utm_source=lslibrary&amp;amp;utm_medium=ui-thumb" target="_blank"&gt;Mango- Database (screencast)&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Bhaskar Shrestha&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.my-photoblog.com/using-sql-server-compact-in-windows-phone-7-1-apps-part-1/" target="_blank"&gt;Using SQL Server Compact in Windows Phone 7.1 apps – Part 1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.my-photoblog.com/using-sql-server-compact-in-windows-phone-7-1-apps-part-2/" target="_blank"&gt;Using SQL Server Compact in Windows Phone 7.1 apps – Part 2&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.my-photoblog.com/using-sql-server-compact-in-windows-phone-7-1-apps-part-3/" target="_blank"&gt;Using SQL Server Compact in Windows Phone 7.1 apps – Part 3&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.my-photoblog.com/using-sql-server-compact-in-windows-phone-7-1-apps-part-4/" target="_blank"&gt;Using SQL Server Compact in Windows Phone 7.1 apps – Part 4&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-5550924060727578475?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/gDJIvOD7hb8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/gDJIvOD7hb8/windows-phone-sql-server-compact.html</link><author>noreply@blogger.com (ErikEJ)</author><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/07/windows-phone-sql-server-compact.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5238131531249720750.post-4370211829530810965</guid><pubDate>Tue, 14 Jun 2011 15:15:00 +0000</pubDate><atom:updated>2011-06-14T17:15:44.131+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.NET</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 3.5</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><category domain="http://www.blogger.com/atom/ns#">SQL Compact 4.0</category><title>SQL Server Compact Private Deployment tweaks</title><description>&lt;p&gt;As a follow up to my &lt;a href="http://erikej.blogspot.com/2010/11/sql-server-compact-private-deployment.html" target="_blank"&gt;previous post&lt;/a&gt; about Private Deployment (the concept that you can simply include the SQL Server Compact DLL files with your application as content, so to speak), I will show you a couple of tweaks that the .NET Framework enables.&lt;/p&gt;  &lt;h3&gt;Forcing an existing application to use the private DLL files&lt;/h3&gt;  &lt;p&gt;If you have an existing application, that is compiled against the centrally deployed DLL files, for example assembly version 3.5.1.0 or 4.0.0.0, you can force the application to use the private assembly version files instead (3.5.1.50 and 4.0.0.1), via an application configuration file. Lets take &lt;a href="http://exportsqlce.codeplex.com/releases/view/52878#DownloadId=160019" target="_blank"&gt;ExportSqlCe40.exe&lt;/a&gt; as an example. This application is complied against assembly version 4.0.0.0, so it will not work unless SQL Server Compact 4.0 runtime is centrally installed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-p8B2qwgfhSI/Tfd7A4T8BoI/AAAAAAAAAiU/O-0B3-VqZHU/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-WB9Vhy_EaRk/Tfd7BSuvEDI/AAAAAAAAAiY/8Lf1U2_oq7I/image_thumb4.png?imgmax=800" width="421" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To force this application to use Private Deployment only, create a .config file named ExportSqlCe40.exe.config, with the following contents:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-xXYD6Z9vGk4/Tfd7CF_ONwI/AAAAAAAAAic/ky8yMa15fWQ/s1600-h/image7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-n8dpTwDH9eE/Tfd7CxFKq-I/AAAAAAAAAig/J0AwDe2hBGc/image_thumb3.png?imgmax=800" width="424" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;?&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;runtime&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyBinding &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:asm.v1&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyIdentity &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.SqlServerCe&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;publicKeyToken&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;89845dcd8080cc91&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;bindingRedirect &lt;/span&gt;&lt;span style="color: red"&gt;oldVersion&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;4.0.0.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;newVersion&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;4.0.0.1&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyBinding&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;runtime&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you run the application now, you will get this error:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-HHwDg_hxoW0/Tfd7D8snyMI/AAAAAAAAAik/pNHceIVO7Oc/s1600-h/image16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-QGhY1JoYAbI/Tfd7Eg5B_SI/AAAAAAAAAio/uQcY5oLCUUI/image_thumb8.png?imgmax=800" width="448" height="232" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now copy all files from the C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Private folder to the folder where the Exportsqlce40.exe file resides:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-NKlTh8bOTAw/Tfd7Ff9DM7I/AAAAAAAAAis/sf6oMO0J20s/s1600-h/image21.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-8pJ4EYk60gU/Tfd7GXYPNSI/AAAAAAAAAiw/DgBDawaQWtA/image_thumb11.png?imgmax=800" width="440" height="194" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now the application runs, and uses only the private DLL files.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Isolating the SQL Server Compact runtime files in a separate folder&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Continuing the sample above, to be neater, it would be nice to have the SQL Server Compact DLL files in a subfolder below the .exe file location. This can be done by moving the files to a separate folder, for example named SqlCe4. Now I have moved all the SQL Server Compact files and folders to that folder:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-0iRaMmOpM2M/Tfd7G-HLYwI/AAAAAAAAAi0/dgO-0zS2FuY/s1600-h/image26.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-4wCoFZ4I_Uw/Tfd7HnT-DWI/AAAAAAAAAi4/8h8YTSB67Pw/image_thumb14.png?imgmax=800" width="431" height="161" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now modify the .config file as follows:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;?&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;runtime&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyBinding &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;urn:schemas-microsoft-com:asm.v1&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;      &lt;strong&gt;&amp;lt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #a31515"&gt;probing &lt;/span&gt;&lt;span style="color: red"&gt;privatePath&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;SqlCe4&lt;/span&gt;&amp;quot;&lt;/strong&gt;&lt;span style="color: blue"&gt;&lt;strong&gt;/&amp;gt;&lt;/strong&gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyIdentity &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;System.Data.SqlServerCe&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;publicKeyToken&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;89845dcd8080cc91&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;bindingRedirect &lt;/span&gt;&lt;span style="color: red"&gt;oldVersion&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;4.0.0.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;newVersion&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;4.0.0.1&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyBinding&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;runtime&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Notice the Probing setting above, that has been added. Also notice that this comes &lt;strong&gt;before&lt;/strong&gt; the bindingRedirect.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Hop you find this useful.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5238131531249720750-4370211829530810965?l=erikej.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~4/ZLZJYwa9aDE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/ErikejBlogsAboutSqlCompactnetAndRelatedStuff/~3/ZLZJYwa9aDE/sql-server-compact-private-deployment.html</link><author>noreply@blogger.com (ErikEJ)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-WB9Vhy_EaRk/Tfd7BSuvEDI/AAAAAAAAAiY/8Lf1U2_oq7I/s72-c/image_thumb4.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://erikej.blogspot.com/2011/06/sql-server-compact-private-deployment.html</feedburner:origLink></item></channel></rss>

