Visual C# 2010 Express - Error 0x8007007E
-
יום שלישי 24 אפריל 2012 17:42
Hi,
I am a newbie to c# ide and trying to learn through video tutorials. As i have reached on to making a new console based project and i added service-based database into my project.
i pressed cancel on data source configuration wizard and when i try to create new Table by right clicking on Table, it gives me an error with details .... "The specified model could not be found.(Exception from HRESULT:0x8007007E)"...
Actions i took----
New Project - ConsoleApplication
Addnew Item - Service-Base Database
Canceld the data source configuration.
Error while creating new tables. "The specified model could not be found.(Exception from HRESULT:0x8007007E)"...
Can anyone have any idea what went wrong or what could cause this error? until now i have been working fine with console projects and didnt got any sort of errors like runtime or compilation etc.
Any suggestions will be highly appreciated. Thanks for reading.
riz
כל התגובות
-
יום שלישי 24 אפריל 2012 18:18מנחה דיון
Delete the service based database from your project. Ensure that SQL Express is installed and running before adding the database back. The database without any data doesn't make much sense so don't cancel the data source configuration otherwise you won't be able to use your database. Depending upon whether you're going classical or Entity Framework will determine which model you'll start with.
Michael Taylor - 4/24/2012
http://msmvps.com/blogs/p3net
-
יום שלישי 24 אפריל 2012 18:53
Dear Michael..
many thanks for taking time to reply. I have sql server 2008 R2 enterprise installed already but do i have to install express edition of sql to comply with vs express ide? Second i was cancelling it because i was following the video tutorials of Bob tabor (learnvisualstudio.net) and as i was on the beginning process so connecting with the database was not the goal..it was just to create tables in visual c# ide? any hint please?
riz
-
יום שלישי 24 אפריל 2012 19:46מנחה דיון
You're going to need SQL Express as well. There are portions of VS that require not only SQLX but that it have its default instance name of SQLEXPRESS otherwise VS will generate an error. Specifically any functionality where you'll be creating a project-level database (such as a service database) then you'll have to have SQLX installed and running. The reason is that you can't just create and attach an MDF to a regular version of SQL Server. Only SQLX (and LocalDB for vNext) allow you to attach and detach MDFs at whim. Normally you'll get an error telling you SQL couldn't be found. Note that VS (at least the full edition) can work with SQL Server itself but it is done through Server Explorer and connection strings rather than creating database files in the project itself.
As far as your error goes it is hard to say at this point where the problem lies. I believe that error code means some DLL could not be found. If you have not yet installed VS2010 SP1 then I would recommend that you do so and see if the problem goes away. If not, and if you want to use a project-level database, then create the database and then select the data source model to use. I would recommend that you select the first one, let it find that there are no tables and then click Finish to end the creation. If it successfully creates the dataset file then you can delete them and you'll be at the same state you would have been if the error didn't occur.
Michael Taylor - 4/24/2012
http://msmvps.com/blogs/p3net
- סומן כתשובה על-ידי RizRiz יום רביעי 25 אפריל 2012 20:19
-
יום רביעי 25 אפריל 2012 20:20
much much appreciated for such a detailed and precise reply.
Thanks
riz