Using - Visual Studio 2005 Professional, SQL Server 2005 Express, WinForms App
Problem - I am unable to connect to SQL Server local Database file (.mdf) through SQL Server Authentication.
I am addding a SQL Database file (local) in the c# winapp solution by right-click -> add new item -> SQL database file.
It adds the file, starts a wizard to create datasets and tableAdapters. Dataset files (.xsd) are created in solution. In the Data Connection pane along ToolBox we can see Database1.mdf.
When i right click on databse1.mdf -> Modify Connection.
It shows a form with Test Connection option. The connection gets tested for Windows Auth.But for SQL Server Auth it shows following error message -
When User Instance = True
Error 1 "Failed to generate a user instance of SQL Server. Only an integrated sonnection can generate a user instance. The connection will be closed"
When i set User Instance = False it shows this message -
Error 2 "An Attemp to attach an auto-named database for file C:\Doc&Sett\Admin\MyDocs\VS2005\Projects\SamApp\SamApp\Database1.mdf failed. A database with the same name
View Complete Post