locked
Where are values for choice lists held in SQL Server database RRS feed

  • Question

  • On my developer machine I am creating a web application and, in this environment, using an intrinsic database. A couple of the tables include Choice Lists. I can see the values in these lists in ApplicationDefinition.lsml.

    When I publish the application and deploy to use a SQL Server 2008 database I no longer see these values.

    Is there a way these values can be added to in the deployed application without re-publishing?

    Friday, February 22, 2013 5:04 PM

Answers

  • Not sure, this is correct.

    Choice list data are indeed stored in the ApplicationDefinition.lsml and a such not present in the database. So, database deployment is not influencing these values. There are there, if you deploy the application binaries.


    paul van bladel

    • Proposed as answer by Yann DuranModerator Sunday, February 24, 2013 2:42 AM
    • Marked as answer by Angie Xu Monday, March 11, 2013 12:11 AM
    Friday, February 22, 2013 6:27 PM

All replies

  • when you deploy solution only database schema is created.

    All data you mention is stored on your developer machine and you can copy tables from developer database to SQLServer2008 or create a script to run on SQL Server to insert data to the table.

    I hope it helps.

    Friday, February 22, 2013 5:23 PM
  • Not sure, this is correct.

    Choice list data are indeed stored in the ApplicationDefinition.lsml and a such not present in the database. So, database deployment is not influencing these values. There are there, if you deploy the application binaries.


    paul van bladel

    • Proposed as answer by Yann DuranModerator Sunday, February 24, 2013 2:42 AM
    • Marked as answer by Angie Xu Monday, March 11, 2013 12:11 AM
    Friday, February 22, 2013 6:27 PM
  • If I understand what you're saying, you're expecting the data that you've entered while debugging your application to be present in the deployed application. This does not happen. The data that you enter during debugging is only test data, & as such doesn't get transferred to the deployed database.

    If you have data that must be there in a deployed application, then you'll need to use a SQL script, or add code to your application to add it programmatically.

    The Choice List values however will be there to choose from when you enter data into the production application.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Monday, March 11, 2013 2:35 AM
    Moderator