Connection String for Windows Authentication


I am able to connect to my database using the Connection string below. I am receiving the message "Failed to Open the Specified Database". I am not sure what can be wrong. I have tried two databases on the same server. Any help is appreciated.

myConnectionString = "Data Source=ABRAHIM-484C76E\sqlexpress;Initial Catalog=AdventureWorks;Integrated Security=SSPI;";

Thank you

3 answers

Sorry, I meant to UNABLE to connect in the first sentence above.

Did you solve this? If not, please provide some more code, not just the connection string.

The server name specified by you is the same server in which your application is running? if not so then you must configure remote connections in SQL Surface area configuration and enable TCP/IP and named pipes option