Reputation: 4559
When I attempt to make a connection from my console app to my sqlExpress. I get the following error:
The user is not associated with a trusted SQL Server connection.
I have:
I always get the same error. I am using VS 2010 and Sql Server 2005
Here is my current connection string
SqlDatabase sqlDatabase = new SqlDatabase(@"Server=localmachineName\SQLEXPRESS; database=database1;user id=username; password=mypassword;");
Upvotes: 3
Views: 757
Reputation: 16838
As indicated, your connection string does not look correct. You can find examples at connectionstrings.com. Alternatively, this KB article may be of some help.
Upvotes: 0
Reputation: 33193
Is sql authorization enabled?
Check this if you haven't already: http://www.hosting.com/support/vps/windows/mixedmode/
Upvotes: 3