locked
I cant create or Insert a new record in the database with Windows Azure? RRS feed

  • Question

  • I had my existing ASP.NET Application which worked fine, I used ADO.NET EDM for Data Access. but when I added a web role of windows azure to this project,I cant insert a new record in my database. datacontext.savechanges() returns "1" but when i look at my database, It has no changes in it. Whats wrong?.. Please help!! 
    Monday, December 27, 2010 3:25 PM

Answers

  • Hi,

    It is possible the database you are looking at is not the same file which your cloud app is connecting.

    To use database on cloud app, we cannot use local sqlserver db file, because the file stored in VM drive is not safe, when role VM get reboot or reimaged, any data saved on vm drive may get lost. Sql Azure may be suitable for cloud environment

    http://msdn.microsoft.com/en-us/windowsazure/sqlazure/default

    Thanks,


    Mog Liang
    • Marked as answer by Mog Liang Monday, January 3, 2011 9:44 AM
    Tuesday, December 28, 2010 3:27 AM

All replies

  • What are you using for your data store? SQL Azure? And can you post any code snippets? Thanks!
    Monday, December 27, 2010 6:51 PM
  • Hi,

    It is possible the database you are looking at is not the same file which your cloud app is connecting.

    To use database on cloud app, we cannot use local sqlserver db file, because the file stored in VM drive is not safe, when role VM get reboot or reimaged, any data saved on vm drive may get lost. Sql Azure may be suitable for cloud environment

    http://msdn.microsoft.com/en-us/windowsazure/sqlazure/default

    Thanks,


    Mog Liang
    • Marked as answer by Mog Liang Monday, January 3, 2011 9:44 AM
    Tuesday, December 28, 2010 3:27 AM