Problem adding new element to the project of type 2008 .mdf database
-
Hello, I am working with Visual Studio 2010 and a Windows Form application, because I want to include a SQL Databse .mdf file as resource for that application in order to keep the data inside the application, I Try to include a new element and I choose a database linked to Service (*.mdf datafile) but I allways receive an error message in which it says that for that action is needed to install first SQL Server 2005 Express or SQL Server 2008 Express and it give an Internet address for downloading. The situation is that SQL Server 2008 Express is just installed, and I can create the same named database from SQL Server Management Studio o Visual Studio Server Explorer without any problem, so why it's not posible to aggregate as new element in the Solution Explorer. Best Regards
-
Hello, I am working with Visual Studio 2010 and a Windows Form application, because I want to include a SQL Databse .mdf file as resource for that application in order to keep the data inside the application, I Try to include a new element and I choose a database linked to Service (*.mdf datafile) but I allways receive an error message in which it says that for that action is needed to install first SQL Server 2005 Express or SQL Server 2008 Express and it give an Internet address for downloading. The situation is that SQL Server 2008 Express is just installed, and I can create the same named database from SQL Server Management Studio o Visual Studio Server Explorer without any problem, so why it's not posible to aggregate as new element in the Solution Explorer. Best Regards
It's not clear what your problem is because you say a couple things that are contradictory. I'll just say that you cannot use a database that is stored in your app's resources. It must be a seperate file in the file system in order for SQL Server to use it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak