.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.DatabaseUpdateMode Property

Specifies the mode of updating the database.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll


public DatabaseUpdateMode DatabaseUpdateMode { get; set; }
Public Property DatabaseUpdateMode As DatabaseUpdateMode

Property Value

Type Description

A DatabaseUpdateMode enumeration value.


Use this property to specify the mode for application database update. By default, the DatabaseUpdateMode.UpdateOldDatabase value is set for this property. However, the DatabaseUpdateMode.UpdateDatabaseAlways value is set in VB solution templates for the debug mode:

Public Class Program
   Public Shared Sub Main()
      Dim _application As MySolutionWindowsFormsApplication = _
      New MySolutionWindowsFormsApplication()
      If System.Diagnostics.Debugger.IsAttached Then
         _application.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways
      End If
    End Sub
End Class

This is done because of the difficulty in incrementing versions in VB projects.


Do not set the DatabaseUpdateMode property to DatabaseUpdateMode.UpdateDatabaseAlways when the Application Server is in use.

For details on the database update process, refer to the Update Application and Database Versions using the ModuleInfo Table topic.

See Also