问题
I'm using Visual Basic Express 2010 and SQL Express 2008 in Windows XP.
At first I couldn't add a datasource (the .mdf file for the database) because of a "Operating system error 32" which I seemed to have resolved by giving myself full permissions for .mdf file (by right clicking on the file and going into properties and then Security) and restarting the SQL SERVER (SQLEXPRESS) service.
The dataset for the database is in my solution explorer but when I right click on a table adapter to add a query and attempt to open up the query builder, I get the error in the title above.
回答1:
Ensure that SQL Express remote connections via TCP/IP and Named Pipes is enabled. You can refer to this article if you are not sure how to do that: How to: Configure Express to accept remote connections
Open SQL Server Management Studio and ensure that you can connect to the database.
Try reconnection from Visual Studio (Server Explorer window) using the same credentials.
来源:https://stackoverflow.com/questions/10504863/error-the-query-builder-failed-cannot-open-user-default-database-login-faile