I'm new to SQL Database C# projects and I have a problem with connecting to my database in a windows form application which is a single user app and I want to use it just for myself. I'm using Visual Studio 2012 On windows7 64-bit and have SQL Server 2008 and 2012 Installed on my DELL Inspiron15 3521 Laptop.
First, I don't know if my connection string is correct or in a correct form. this is my connection string:
con.ConnectionString = "Data Source=(local); Initial Catalog=Library;Integrated Security=True";
Secondly, I have another problem: when this code is running in Visual Studio 2012, it's telling me that "Cannot open database "Library" requested by the login. The login failed.". This is happening when my authentication in SQL server is Windows Authentication and I don't have any login information add to the database. Is any configuration for it or it's just my code that is wrong?