locked
database under query analyser of win mobile 5.0 emulator RRS feed

  • Question

  • I am a begineer in C#.net

    I have created a .sdf database in C# project of Visual Studio 2008. I have used microsoft SQL server compact 3.5 as a data source. I have set the copy to output directory property of that database as copy if newer. I have one table created under that database in VS 2008. When i run the application for the first time the database gets copied in the Query Analyser of Win mobile 5.0 emulator and i could see the table undet it. But when i add more table to the same database in C# project and then run the application once again, i could not see the newly added tables.

    Another problem i am facing is that the database in win mobile 5.0 emulator gets corrupted very often. What is the reason? I am losing my data due to this.

    I have SQL server management studio installed on my pc. I want to create a SQL server mobile database under it and then add that database to my project. Which data source i have to chose? What are the steps to be followe?

    What is the difference in using the database created in Query analyser and the database craeted in SQL server mobile?

    Thank in advance
    Thursday, March 12, 2009 3:43 PM

Answers

  • Hi,

    >>When i run the application for the first time the database gets copied in the Query Analyser of Win mobile 5.0 emulator and i could see the table undet it. But when i add more table to the same database in C# project and then run the application once again, i could not see the newly added tables.

    Did you deploy the project (Right clicking on your project and select "Deploy")? If yes I would suggest that you use "Do not copy". When there are updates, change it to "Copy always" and deploy the project; after that you change it back to "Do not copy".

    >>Another problem i am facing is that the database in win mobile 5.0 emulator gets corrupted very often. What is the reason? I am losing my data due to this.

    Not sure what you meant by "corrupt", but it might due to the database being redeployed from destktop to the device and making the data overwritten.

    >>I have SQL server management studio installed on my pc. I want to create a SQL server mobile database under it and then add that database to my project. Which data source i have to chose? What are the steps to be followe?

    SQL Server Management 2005 does not support creating SQL CE 3.5 database. You can use Visual Studio 2008 > Add new item > Data > Database file. Then you can manage the database within VS 2008. 

    >>What is the difference in using the database created in Query analyser and the database craeted in SQL server mobile?

    The only thing I could think of is the version. 

    Regards,
    Chunsheng Tang
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by warrentang Wednesday, March 18, 2009 2:28 AM
    Monday, March 16, 2009 9:00 AM