Compartilhar via


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

Comments

  • Anonymous
    May 02, 2006
    Steve posts some good information on getting offline client apps developed with VS2005 and .NET Framework...
  • Anonymous
    May 28, 2006
    The comment has been removed
  • Anonymous
    June 19, 2006
    Has anybody converted these to C# yet
  • Anonymous
    June 20, 2006
    I'd be happy to post conversions, or links to conversions, if someone wants to do the work.
  • Anonymous
    June 25, 2006
    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
  • Anonymous
    June 25, 2006
    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.
  • Anonymous
    August 02, 2006
    The comment has been removed
  • Anonymous
    November 07, 2008
    When I try installing the code snipplets to VB 2008 Express Edition with SP1, it says thatthe installation completed successfully, but it also says "Install Skipped." Needless to say, the snipplets were not installed. No explanation given as to why the install was skipped. Any suggestions on how to go about overcoming this?