Installing DB from script

  • Hello -

    I have a Visual Basic .net (2005) application that uses a SQL Server Compact 2005. I am using the installation program that comes with Visual Studio which installs SQL Server and my app just fine. From there I need to install/create my DB in SQL Server Compact. I have just created scripts inside SQL Mgt Studio and am planning on running those using sqlcmd. But...it is failing and not giving me an error message and the db isn't being created. I can run the scripts without using SQLCMD and they work fine so I don't believe it is the scripts. Is there anything that has to be set in the db to allow it to be created with the scripts? Is there something else I am missing? I am open to anything and this is the last thing interfering with getting my the program out to the world! Thanks

  • Hi,

    Why dont you use SqlCeEngine.CreateDB() function to create database.

    On the other hand sql server CE has some restrictions. For example there is no Varchar datatype. Instead you have to use nVarChar... SqlCE doesn't have ISNULL function like SQLServer. ( I dont know is it forgatten;) )

    There may be some error in your script such these restrictions

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply