Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update model from database in Visual Web Developer 2010 Express?

I have an existing model for a MySQL database. I've added a new table in my database and now I want to update the model.

But when I right-click in the Model browser and select Update Model from Database... I get following message:

An exception of type 'Microsoft.VSDesigner.Data.Local.ConnectionStringConverterServiceException' occurred while attempting to update from the database. The exception message is: ''.

Application works just fine with existing model. I mean, data is successfully fetched when needed and all.

What might cause the problem with updating the model? Is it because of Express edition? How can I resolve the problem?

UPDATE:

<connectionStrings>    
    <add name="OtherDbDataContext" connectionString="metadata=res://*/DataAccess.EF.OtherDb.csdl|res://*/DataAccess.EF.OtherDb.ssdl|res://*/DataAccess.EF.OtherDb.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;User Id=id;Password=password;Host=localhost;Database=otherdb;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;Persist Security Info=True&quot;" providerName="System.Data.EntityClient" />
    <add name="DbDataContext" connectionString="server=localhost;User Id=id;password=password;Persist Security Info=True;database=db" providerName="MySql.Data.MySqlClient" />
    <add name="DbDataConnectionString" connectionString="server=localhost;User Id=id;password=password;Persist Security Info=True;database=db" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
like image 399
Bobrovsky Avatar asked Dec 13 '22 06:12

Bobrovsky


1 Answers

Solved this problem by deleting all connectionstrings from config file. After that when you update model it prompts you to add connectionstrings and everything is working normally.

Hope it helps.

like image 61
Denis Besic Avatar answered Jan 24 '23 22:01

Denis Besic