2013년 1월 24일 목요일

Create SQL Server CE database file programmatically



Create SQL Server CE database file programmatically

There is some good info here: Create a SQL Server Compact Edition Database with C#


   string connectionString = @"Data Source=|DataDirectory|\DB.sdf";
        void DBCreate()
        {
            try
            {
                //database create.
                SqlCeEngine en = new SqlCeEngine(connectionString);
                en.CreateDatabase();
            }
            catch
            {

            }
        }

댓글 없음: