Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

XafApplication.DatabaseUpdateMode Property

Specifies the mode of updating the database.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll

Declaration

[Browsable(false)]
[DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)]
public DatabaseUpdateMode DatabaseUpdateMode { get; set; }

Property Value

Type Default Description
DatabaseUpdateMode

UpdateOldDatabase

A DatabaseUpdateMode enumeration value.

Remarks

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.

Note

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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DatabaseUpdateMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also