none
Lighswitch error publication in Azure. Incorrect syntax near 'MULTI_USER'

    Question

  • Hi everybody,

    I'm developing an application for azure with lightswitch. I've published the first time and everythings go fine but the second time appears me this message:

    Incorrect syntax near 'MULTI_USER'

    Hope somebody could help me, thanks a lot.

    Tuesday, September 04, 2012 4:09 PM

Answers


  • Hi Martiana,

    As your problem is "Incorrect syntax near 'MULTI_USER'" , it seems to be a problem within the Sql Server problem.

    I suggest you to create a new sql server for your lightswitch application in azure

    • Marked as answer by Otomii Lu Monday, September 17, 2012 2:53 AM
    • Unmarked as answer by Martiana Monday, September 17, 2012 2:27 PM
    • Marked as answer by Martiana Monday, September 17, 2012 2:27 PM
    Friday, September 07, 2012 1:16 AM

All replies

  • Hi Martiana

    Kindly verify your deployment by following the below post.

    Publishing LightSwitch App to Azure with Visual Studio 2012

    Regards


    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    Wednesday, September 05, 2012 3:48 AM
  • Hi, thanks for the answer but I've created the app with Lightswitch 2011 and Visual Studio 2010. I've followed the How I do videos from Beth Massi and everything works fine for the first time, but the problem is that I've made some little changes in the app and in the next publish action appears the message "INCORRECT SYNTAX NEAR MULTI_USER".

    I thought the problem is here:

    <Target Name="DeploySchema" Condition=" '$(RequiresIntrinsicDataSource)' == 'true' and '$(_GenerateSchemaScript)' != 'true' ">
            <DeploySchema ConnectionString="$(PublishConnectionString)" />

            <CreateSqlUser ConnectionString="$(PublishConnectionString)"
                           UserName="$(SqlUserName)"
                           Password="$(SqlUserPassword)" 
                           AuthenticationType="$(AuthenticationType)"
                           Condition=" '$(CreateSqlUser)' == 'true' and '$(SqlUserName)' != 'sa' " />
        </Target>

    Hope somebody can help me, thanks.


    Wednesday, September 05, 2012 7:55 AM
  • Hi Martiana

    From where you got the above code? Did you change something in .lsml file?

    I suggest you to verify your installation by following the below post demonstrated by Andy Kung

    Step-By-Step: How to Publish to Windows Azure

    Regards

    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    Wednesday, September 05, 2012 11:25 AM
  • Hi, I've didn't change the .lsml file. And I've published doing the same process of the link you send me. In the second of publishing the changes I've made I've got the messages with the error.
    Thursday, September 06, 2012 5:20 PM

  • Hi Martiana,

    As your problem is "Incorrect syntax near 'MULTI_USER'" , it seems to be a problem within the Sql Server problem.

    I suggest you to create a new sql server for your lightswitch application in azure

    • Marked as answer by Otomii Lu Monday, September 17, 2012 2:53 AM
    • Unmarked as answer by Martiana Monday, September 17, 2012 2:27 PM
    • Marked as answer by Martiana Monday, September 17, 2012 2:27 PM
    Friday, September 07, 2012 1:16 AM
  • Hi Martiana,

    I too had this problem once but haven't found out what was the real cause.  

    I remember having a connection to the DB (either using SSMS or via the SQL Azure management portal, can't remember which).  I remember shutting down everything, reloaded VS2010 and the problem went away immediately.

    Sorry for not being specific and I hope you're able to solve your problem.

    Best regards,

    CTE

    • Marked as answer by Otomii Lu Monday, September 17, 2012 2:52 AM
    • Unmarked as answer by Otomii Lu Monday, September 17, 2012 2:52 AM
    Friday, September 07, 2012 4:59 AM
  • Hi Anna, 

    Thanks, but what happens with all the data in the SQL database? Can I create a nex sqlserver with the old database?

    Thanks.

    Monday, September 17, 2012 2:27 PM
  • Hi Martiana,

    I as well had the same problem.

    Basically, when you redeployed your LS application you changed things within your Database tables of which Azure could not rectify in a way automatically.

    For example, if you changed a field type, or a Field column name, or if that particular field was supposed to be required or not.

    For more details, review this: http://answers.flyppdevportal.com/categories/azure/sqlazure.aspx?ID=fbdb53da-2891-4817-ba0f-4e2029254ccd

    Hope it helps.

    Roger

    Wednesday, September 26, 2012 9:52 AM
  • Also getting this error. Not good. Do I have to delete and create a new SQL db every time I deploy?

    I'm using VS 2012 with update 2

    Saturday, May 04, 2013 6:28 AM
  • This problem in general is caused when you make physical changes in the DB such as delete a column, change a column type, etc.

    In these cases, the deployment wizard is not able to update the production DB in Windows Azure, so it ends up with that confusing error message.

    Changes that involve addition to the schema such as a new table or even a new column are less prone to produce this behavior.

    Nevertheless, I strongly recommend you to take note of every physical change you make to the development database, because if you get to notice this error, you will have to recreate each of those changes by hand against the server using T-SQL maybe thru the SSMS.

    Otherwise, the only solution will be to delete and recreate the DB on the cloud, but you will be losing all the data and we don't want that happening right?

    Try to find which is the change you made that is causing problems, and reply it on the cloud by hand.


    Open mind for a different coding

    Monday, June 17, 2013 6:58 AM
  • This problem in general is caused when you make physical changes in the DB such as delete a column, change a column type, etc.

    In these cases, the deployment wizard is not able to update the production DB in Windows Azure, so it ends up with that confusing error message.

    Changes that involve addition to the schema such as a new table or even a new column are less prone to produce this behavior.

    Nevertheless, I strongly recommend you to take note of every physical change you make to the development database, because if you get to notice this error, you will have to recreate each of those changes by hand against the server using T-SQL maybe thru the SSMS.

    Otherwise, the only solution will be to delete and recreate the DB on the cloud, but you will be losing all the data and we don't want that happening right?

    Try to find which is the change you made that is causing problems, and reply it on the cloud by hand.

    Open mind for a different coding

    Monday, June 17, 2013 6:58 AM
  • I encountered this problem when I was changing some decimal fields from nullable to not nullable. This makes lightswitch freak out because it is expecting a value. I had to go in to the DB and update the not nullable values to have values, and it all worked after that. 
    Sunday, July 14, 2013 4:01 PM