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

Bobrovsky picture Bobrovsky · Dec 28, 2011 · Viewed 7.3k times · Source

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>

Answer

Denis Besic picture Denis Besic · Jul 4, 2012

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.