By default, ConnectionStringDataStoreProvider creates an updating data store with pooling (DataStorePool), which may cause NullReferenceException on calling the DropTable, DropColumn, DropIndex, DropConstraint, RenameTable, RenameColumn, UpdateXPObjectType, DeleteObjectType, … and other SQL Server-related methods of ModuleUpdater:
System.NullReferenceException occurred
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=DevExpress.ExpressApp.v16.2
StackTrace:
at DevExpress.ExpressApp.Updating.ModuleUpdater.CreateCommand(String commandText)
at DevExpress.ExpressApp.Updating.ModuleUpdater.ExecuteNonQueryCommand(String commandText, Boolean silent)
at TattooStudio.ExpressApp.Module.Updater.UpdateDatabaseBeforeUpdateSchema() in C:\Source\REV23\TattooStudio\TattooStudio.ExpressApp\TattooStudio.ExpressApp.Module\DatabaseUpdate\Updater.cs:line 30
at DevExpress.ExpressApp.Updating.DatabaseUpdaterBase.BeforeUpdateSchema(IList`1 moduleUpdaters)
at DevExpress.ExpressApp.Updating.DatabaseUpdaterBase.UpdateCore(IObjectSpace updatingObjectSpace, IList`1 versionInfoList)
at DevExpress.ExpressApp.Updating.DatabaseUpdater.Update()
The reason is that during the CreateCommand call, the (((BaseObjectSpace)objectSpace).Connection or Session.Connection objects may be null in this particular configuration, as expected.