I’m using C# Express 2010 and SQL Server 2008 Express.
I want to create a connection to said server in the C# IDE (not in code) by going Database Explorer -> Right Click -> Add Connection, but it only gives me an option to connect to a file rather than a server name.
And even if I do try to connect to the file I get a “This file is in use” error thrown at me.
Can anyone tell me where I’m going wrong?
Perhaps you have chosen the wrong kind of Datasource? It should say “Microsoft SQL Server (SqlClient)”, not “Microsoft SQL Server Database File (SqlClient)”.
You should then get a text box called “Server name” where you need to enter the name of you SQL Express instance. Most often, this should be “.\SQLEXPRESS”