Install the SQL CE 4.0 package: http://www.microsoft.com/en-us/download/details.aspx?id=17876

Try adding the reference in your IDE to "C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v4.0\Desktop\System.Data.SqlServerCe.dll" 

Add the using clauses:

using System.Data.SqlServerCe;
using System.IO;


Then try something like this: 

        string connectionString;
        string fileName = "test.sdf";
        string password = "test";

         if (File.Exists(fileName))
            File.Delete(fileName);

        connectionString = string.Format("DataSource=\"{0}\"; Password='{1}'", fileName, password);

        SqlCeConnection conn = null;

        try {

            SqlCeEngine engine = new SqlCeEngine(connectionString);
            engine.CreateDatabase();

            conn = new SqlCeConnection(connectionString);
            conn.Open();

            SqlCeCommand cmd = conn.CreateCommand();
            cmd.CommandText = "CREATE TABLE myTable (col1 int, col2 ntext)";
            cmd.ExecuteNonQuery();
        }
        catch(Exception ex) 
        {
            Console.WriteLine(ex.ToString());
        }
        finally {
            conn.Close();
        }


Can't use sql server ce 4.0 in asp.net in visual studio 2012
I'm using the colorbox plugin for modal popups. It's working nicely, but there's a main thing about it that seems wrong.

I have a form that pops up, and on submitting (or clicking a link) in the form, this might open another "colorbox" modal. It works smoothly, but there's one thing that bothers me.

As it is, colorbox seems to wait until it receives the response (via ajax) and then shows a "loading.gif" and starts to change size.

To me it makes more sense to have the "loading.gif" show as soon as they are opening a new colorbox modal. (and not just the image, I just mean that whatever happens when you open a new colorbox) It doesn't have to resize (obviously) but it's just annoying because some of my colorbox modals use webservices that are slow, so you might submit a form and nothing happens for literally 1 or 2 seconds. It'd be nice if it just would look like it was loading the next one for that time.

Ideas on how to do this?
