When connect to default instance, you cannot use .\MSSQLSERVER. Please try just "."
i.e. Data Source=.;AttachDbFilename=....blahblah.
|||The 'Add New Connection' dialog box doesn't give that option. It is a dropdown combo box, with the only option being '.\MSSQLSERVER'. It can't be edited. The dialog box is creating the connection string, not me.|||I just checked, and it seems it's a bug in VS 2005. Here is a workaround.When you are in Add Connection window, change your data source from "Microsoft SQL Server Database File (SqlClient)" to "Microsoft SQL Server (SqlClient)". You can then input your server name as "." in the new window. You can also attach your database file.|||
Yet another workaround.
VS 2005, Tools Menu --> Options-->Database Tools--> Data Connections-->SQL Server Instance Name, change it from sqlexpress to blank. After this, when you create a new connection, the server will be default to "." rather than ".\sqlexpress". So, you don't have to choose .\MSSQLSERVER which is invalid.
|||This is exactly the same problem I am having, Xinwei. -connecting to SQL 2005 from Visual C# Express, but I am in Visual C# Express and there is no Tools->Options->Database Tools. Can I change this manually somehow?
Thanks.|||I found this reference in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCSExpress\8.0\DataSources\{067EA0D9-BA62-43f7-9106-34930C60C528}
Value=Microsoft SQL Server
...along side other data sources.
Are these not being loaded?
No comments:
Post a Comment