none
Redeployed app fails on Azure Database update

    Question

  • HI,

    Suddenly lightswitch is giving us a database error when deploying. We are deploying to Azure DB and hosted on Azure as well. We have not changed any of the deployment options but the error we're getting is:

    Please Help

    Wednesday, July 04, 2012 10:26 AM

Answers

  • Basically your issue is... After you first published your LS app to Azure and the data tables were first created in Azure SQL you modified the data table in your LS project in a way that your changes cannot be made on the Azure SQL instance automatically.

    Did you change any existing fields that were created in the database when you first published? Like change field type from string to Integer?

    If you change  a field type directly on the SQL server it may warn you that you will lose data.. This is the same case except if this happens during publish it will error out with this Multi-user error.

    If you make a field required that was not required before and there are already records in the database where the field is emtpy it will not let you convert it untill every existing record already has data in that field.

    If you change a field type you need to make sure there is no data in that field in Azure SQL database or the field cannot be converted automatically during publish. Its a conflict.

    Also, if you rename table columns in Lightswitch you should go into the SQL manager of Azure and manually change the fields there before you publish.. or you will create new fields in the database and the existing information will be in the old field.


    • Proposed as answer by Orloaf Friday, July 13, 2012 10:14 PM
    • Edited by Orloaf Friday, July 13, 2012 10:24 PM Clarification
    • Marked as answer by Herve RoggeroMVP, Moderator Tuesday, July 17, 2012 1:29 PM
    Tuesday, July 10, 2012 9:30 PM

All replies

  • Hi Jürgen.Paul,

    >> exception when deploying the database application, incorrect syntax near 'MULTI_USER'

    Regarding to the screenshot you provided, the error message seems related to micfosoft.ligtswitch.targets issue.

    To deploy the Visual Studio LightSwitch application to the Azure cloud. Please refer to this video about How Do I: Deploy a LightSwitch Application to Azure?

    For Visual Studio LightSwitch issue, please link to Visual Studio LightSwitch forums for further help.

    Regards, Amber zhang

    Thursday, July 05, 2012 6:10 AM
  • any idea where the error?
    Friday, July 06, 2012 1:56 PM
  • Amber, what exactly does the error represent? I am also getting the error message. We are not deploying the application to Azure, just the database.

    Paul


    PP

    Sunday, July 08, 2012 4:48 PM
  • Basically your issue is... After you first published your LS app to Azure and the data tables were first created in Azure SQL you modified the data table in your LS project in a way that your changes cannot be made on the Azure SQL instance automatically.

    Did you change any existing fields that were created in the database when you first published? Like change field type from string to Integer?

    If you change  a field type directly on the SQL server it may warn you that you will lose data.. This is the same case except if this happens during publish it will error out with this Multi-user error.

    If you make a field required that was not required before and there are already records in the database where the field is emtpy it will not let you convert it untill every existing record already has data in that field.

    If you change a field type you need to make sure there is no data in that field in Azure SQL database or the field cannot be converted automatically during publish. Its a conflict.

    Also, if you rename table columns in Lightswitch you should go into the SQL manager of Azure and manually change the fields there before you publish.. or you will create new fields in the database and the existing information will be in the old field.


    • Proposed as answer by Orloaf Friday, July 13, 2012 10:14 PM
    • Edited by Orloaf Friday, July 13, 2012 10:24 PM Clarification
    • Marked as answer by Herve RoggeroMVP, Moderator Tuesday, July 17, 2012 1:29 PM
    Tuesday, July 10, 2012 9:30 PM
  • I'm getting it as well. seems like an issue IMHO - whole point of Lightswitch is RAD and Refactoring. It would be very useful to know what table/column is causing this so we can attempt to patch the Azure database. I've just added about 10 new tables and refactored a few existing ones.

    I wish someone like Beth Massi would take note of this.


    Martin


    • Edited by emtopping Monday, August 13, 2012 11:13 PM
    Monday, August 13, 2012 11:12 PM
  • I found the column I changed a type on - zapped it Azure & then managed to publish.

    Martin

    Monday, August 13, 2012 11:22 PM