i have a C# project but when i add the new item sqldatabase(.mdf) file in project.
it does not add and a error is occured
error
Failure to generate a user instance of sql server due to failure in starting the process of user instance
please reply
Loading

keshav singhPosted Nov 20, 2009, 3:17 AM
thatit it does not contain configuration or advanced option
reply
Lalit MPosted Nov 20, 2009, 2:30 AM
Step 1. Enabling User Instances on your SQL Server installation
First we are gonna make sure we have enabled User Instances for SQL Server installation.
Go to Query Window in SQL Server Management Studio and type this:
exec sp_configure 'user instances enabled', 1.
Go
Reconfigure
Run this query and then restart the SQL Server.
Step 2. Deleting old files
Now we need to delete any old User Instances.
Go to your C drive and find and completely DELETE this path (and all files inside):
C:\Documents and Settings\YOUR_USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS(Dont forget to replace the green text in the path with your current username (if you are not sure just go to C:\Documents and Settings\ path to figure it out).
After deleting this dir you can go to Visual Studio, create ASP.NET WebSite and click on your App_Data folder and choose Add New Item and then choose SQL Server Database
More options
-------------
Check your connection String