i am beginner is programming. I want to write a program by c# in visual studio 2015 with a simple database that takes some data, save it and read from that database. I wrote some of my code in a windows form application and now I want to add a database. I right-click on on my project name in the solution explorer and then choose "Add" and the "New Item". In the the opened window i click on "Service-Based Database", enter name and click on Add button. But at this moment it show me an error that u can see below:
A network-related or instance-specific error occurred while establishing a connection to SQL server. The server was not found or was not accessible. Verify that the instance names is correct and that SQL Server is configured to allow remote connections. (Provide: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I did this before it and there was no error, but now I see to this error and I don't know what's the problem. I have installed SQL server 2015 on my windows 10 and when I enter "sqllocaldb.exe i" in the cmd, it shows me:
dbname MSSQLLocalDB
how can i solve this problem and add new database to my applications?
I have installed sql server on my computer and repair it once but when i wanted to check it from windows services i couldn't find sql server in the servisec.
thank you for your attention