Forcing a Database Update with DevExpress

Sometimes, DevExpress doesn’t seem to pick up your model changes. This happens fairly frequently when building a new module. The build process you should follow is:

  1. Clean Solution: Right-click your solution, and pick Clean Solution.
  2. Update Models: Right-click your solution and pick Update Model on All Projects
  3. Build Solution: Press F6 to build the solution.
  4. Deploy: Deploy your module’s .DLLs to the \bin folder of the application.

If you’re following this process, there’s no chance of your changes not being picked up; there must be something else at play. If you suspect (or know, from peeking at the schema) that the schema is not being updated, you have two options:

  1. Force an Update: Do this by querying the ModuleInfo table and updating the Version column for your module to something really small (like 1.0.0.0).
  2. Obliterate the Database: Delete the entire database.

In either case, run the DB updater from your \bin directory: DBUpdater.v11.1.exe ..\Web.Config

Everything should be updated. Verify in SQL Management Studio.

About Ashiq Alibhai, PMP

Ashiq has been coding C# since 2005. A desktop, web, and RIA application developer, he's touched ASP.NET MVC, ActiveRecord, Silverlight, NUnit, and all kinds of exciting .NET technologies. He started C# City in order to accelerate his .NET learning.
This entry was posted in Libraries, Web, Wndows Forms and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *