The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.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.v19.2.dll

Declaration

[Browsable(false)]
[DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)]
public DatabaseUpdateMode DatabaseUpdateMode { get; set; }
<Browsable(False)>
<DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)>
Public Property DatabaseUpdateMode As DatabaseUpdateMode
[Browsable(false)]
[DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)]
public DatabaseUpdateMode DatabaseUpdateMode { get; set; }
<Browsable(False)>
<DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)>
Public Property DatabaseUpdateMode As DatabaseUpdateMode
[Browsable(false)]
[DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)]
public DatabaseUpdateMode DatabaseUpdateMode { get; set; }
<Browsable(False)>
<DefaultValue(DatabaseUpdateMode.UpdateOldDatabase)>
Public Property DatabaseUpdateMode As DatabaseUpdateMode

Property Value

Type Default Description
DatabaseUpdateMode

UpdateOldDatabase

A DatabaseUpdateMode enumeration value.

Property Value

Type Default Description
DatabaseUpdateMode

UpdateOldDatabase

A DatabaseUpdateMode enumeration value.

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.

See Also