After spending 6 hours today to get a connection with my SQL Server 2012 database from Visual Studios 2012, I give up.
Setup:
- Database:
App_Data/GameDB.mdf - DB Location:
C:\Users\USERNAME\Documents\Visual Studio 2012\Projects\ProjectRawWar\ProjectRawWar\App_Data\GameDB.mdf Connection string:
<add name="LocalSqlServer" connectionString="Data Source=(LocalDB)\v11.0;Initial Catalog=GameDB;Integrated Security=False;"/>I first tried a SQL Server Compact database, didn't work.
- I tried many other connection strings from connectionstrings.com, didn't work.
- I tried to put the full path of the database in the connection string, didn't work.
Can someone please help me out of my misery?
Update: I just followed http://msdn.microsoft.com/en-us/library/aa983322.aspx. The database is there. I copied the connection string from the wizard right into my webconfig connectionstring, still doesnt work. Why? Where is the logic?