Welcome to MSDN Blogs Sign in | Join | Help

SQL Server Mobile, SQL Server Everywhere Edition Code Snippets

When working with SQL Server Mobile / SQL Server Everywhere Edition (SSEv) here are a few code snippets that can be very useful.  Visual Studio 2005 incorporated a concept of Code Snippets which allows you to enter a shortcut in the code editor and Visual Studio will expand that shortcut into code with replacement regions.  These code snippets are written in VB, but they could easily be converted to C#.  ...no, I don't currently plan to convert them, but if someone would like to I'll be glad to post those samples and give credit.

SQL Server Everywhere Edition Connection String Conversion to Physical Path
Used to update the SQL Server Everywhere Edition Connection String to a fully qualified path for use in Click-Once scenarios and MSI type scenarios.
Snippet is designed to be used in the partial class of the settings file.  Click the settings tab on the application designer and select view code.  Handle the event for Settings_Loaded

Verifies a SQL Server Everywhere Edition database exists
Uses a SqlCe Connection String to verify the database already exists on disk.  If not, the database will automatically be created

SQL Server Everywhere Edition Updatable Result Set
Creates an updatable resultset against a SQL Server Everywhere Edition database

Sync a local SQL Server Everywhere Edition database using SQL Server Everywhere Edition Merge Replication
Uses SQL Server Everywhere Edition Merge Replication to sync changes to the local SQL Server Everywhere Edition database with a SQL Server publication


 

Published Tuesday, May 02, 2006 11:25 PM by Steve.Lasker
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Infomration on Offline Client applications with .NET Framework 2.0

Tuesday, May 02, 2006 10:40 PM by Brad Abrams
Steve posts some good information on getting offline client apps developed with VS2005 and .NET Framework...

# re: SQL Server Mobile, SQL Server Everywhere Code Snippets

Sunday, May 28, 2006 8:10 AM by Touraj Vaziri
HI Steve
i hope you're well
I will be short
If you take some time and visit the blogs around the world about sql mobile synching to sql express, you will see how angry developers are and how silly the design team look

We dont want to hear about Web Service etc
When you are trying to synch in a mine where is web services going to fit in your equation. no where!!!
There are so many industries in need of software but we are not going to be able to push sql servers on each laptop. That is crazy. I dont know who made this ridiculous decision of not having local db to sql mobile synchronization. It is beyond stupidity.
Palm offers it, Primeworks is trying to offer it, Lotus notes offers it....Yes we are happy to pay for it but please dont get someone to rehash the same message of using web services
I dont think some of your employees have ever worked in the real world...real people and real restrictions when in a mobile environment

People are going to leave sql mobile if this isnt addressed soon
We are happy to pay for it which should make you happy about not giving any more for free
Please do something as people are going to leave your development environment for the mobile platform
Regards
Touraj

# re: SQL Server Mobile, SQL Server Everywhere Code Snippets

Tuesday, June 20, 2006 2:12 AM by Richard
Has anybody converted these to C# yet

# re: SQL Server Mobile, SQL Server Everywhere Code Snippets

Tuesday, June 20, 2006 11:25 AM by Steve.Lasker
I'd be happy to post conversions, or links to conversions, if someone wants to do the work.

# re: SQL Server Mobile, SQL Server Everywhere Code Snippets

Sunday, June 25, 2006 2:08 PM by staceyw
In c#, it does not pick up the new system.data dll in the GAC so I can't include System.Data.SqlServerCe cause I don't know what file to reference.  Where is it?  TIA

# re: SQL Server Mobile, SQL Server Everywhere Code Snippets

Sunday, June 25, 2006 10:52 PM by Steve.Lasker
When adding a reference in a desktop project, compared to a device project, the Add Reference dialog lists the assembly as Microsoft SQL Mobile instead of System.Data.SqlServerCe.  
We hope to fix this when Visual Studio ships Sp1 later this year.

# Demo Videos of SQL Mobile / SQL Server Everywhere Edition

Wednesday, August 02, 2006 3:35 PM by Steve Lasker's Web Log
Some demo videos of various features and components that enable Occasionally Connected Applications ...

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker