No Local Database visible in Visual Studio 2015 Community RRS feed

  • Question

  • New to programming and trying to set up a local database in my application

    "local database" is not an option when try to Add/New Item

    I have reinstalled and modified to include "SQL Server Data Tools"

    I have also done the Microsoft SQL server update from within visual studio

    Have tried to use Service based database but doesn't seen to update database once application restarted

    Any Clues


    • Edited by Big Vil Wednesday, March 16, 2016 3:55 AM
    • Moved by lake Xiao Monday, March 28, 2016 2:47 AM
    Wednesday, March 16, 2016 3:55 AM

All replies

  • Hi Big Vil,

    Thank you for posting in MSDN forum.

    >>"local database" is not an option when try to Add/New Item

    For his question, actually, in VS 2015, the “Local database” Item doesn’t exist, once you download the SQL Server Data Tools (SSDT),

    you could Build and Deploy to a Local Database as below:

    >>Have tried to use Service based database but doesn't seen to update database once application restarted

    For this situation, could you please specify more detailed information about the “update database once application restart”

    Best Regards,

    Lake Xiao

    • Proposed as answer by lake Xiao Friday, March 18, 2016 8:29 AM
    • Unproposed as answer by lake Xiao Monday, March 28, 2016 2:44 AM
    • Edited by lake Xiao Monday, March 28, 2016 2:45 AM
    Thursday, March 17, 2016 7:29 AM
  • Thanks Lake

    I have used a service based database in a test application

    When I run the application, datafields appear as expected but if I add a new entry, when I stop the application and start it again, the entries I made are not recorded to the database and lost.

    Perhaps don't worry too much at this stage until I have had the opportunity to explore the link you sent me with regard to local databases, unless I am missing something obvious.


    Sunday, March 20, 2016 11:30 AM
  • Hi Big Vil,

    In order to have a better understanding of your issue and help you further troubleshoot.

    There are some clarifications with you:

    1.What type of database did you try to connect? ( or entity framework or others)

    2. Please offer your test sample code and connection strings 

    After providing the above information, we could try to reproduce the issue and do more research to find the solution.
    Best Regards,
    Lake  Xiao

    • Edited by lake Xiao Monday, March 21, 2016 8:33 AM
    Monday, March 21, 2016 8:33 AM
  • I am assuming you need the code rather than the built application

    Could you please tell me the easiest way to upload it to you as am very new to programming and the forum



    Wednesday, March 23, 2016 9:24 PM
  • Hi Big Vil,


    Please upload the code or source file to and share the link here.

    As so as we receive your code and the database sample, we could reproduce the issue and do further troubleshooting.


    Best Regards,

    Lake Xiao

    Thursday, March 24, 2016 1:54 AM
  • Thanks Lake

    Here is the link to the folder that contains the project LocalDatabaseApp!1088&authkey=!AJoxMRCX_mHVc4M&ithint=folder%2csql

    Note that there are two data sets connected to the app but data on the form is connected to SampleDatabase dataset1

    When I run the app, any changes to the database I make and save are not recorded to it and lost when I run the app again

    Please let me know if there is anything else you need



    Sunday, March 27, 2016 9:27 PM
  • Hi Vilim,

    Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools.


    As your issue is related to Entity Framework, I help you move this case to Data Platform Development  >  ADO.NET Entity Framework and LINQ to Entities

    forum for dedicated support.

    Thank you for your understanding.

    Best Regards,

    Lake Xiao

    Monday, March 28, 2016 2:46 AM
  • Hi Lake

    I have had no further contributions since your last reply

    In fact if you follow the link you gave me, the most recent post suggestes EF no longer use that forum, back from about June last year

    Where can I go to get help with this?


    Saturday, April 9, 2016 8:28 PM
  • Hi Big Vil,

    >>Where can I go to get help with this?

    Sorry for late reply, I download your project, and reproduce the issue on my side, when debug the project, it would generate a database in your bin/debug directory. and your data is saved in this database.

    I would suggest that you change your connection like this:

    <add name="LocalDatabaseApp.Properties.Settings.SampleDatabaseConnectionString"
                connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=D:\Code\OPProject\LocalDatabaseApp\LocalDatabaseApp\SampleDatabase.mdf;Integrated Security=True"
                providerName="System.Data.SqlClient" />

    Best regards,

    Cole Wu

    Monday, April 11, 2016 9:20 AM
  • Hi Cole

    Sorry butshould have left my last post - thought I had figured it out

    Found the location of these entries in properties of Sample Database .mdf but won't allow me to edit them in the properties window.

    Also the file location in connection string does not seem to relate to my system. Should I change it to point to the project location on my system.



    Tuesday, April 12, 2016 5:47 AM