project BLF > class Persistence Layer > method WriteDirect

Description

Write directly to the database, without using any temp-tables, without optimistic lock.
Cannot be used to create data in the database.

PostCondition

Unless run inside a larger transaction (when run from methods PreSave or PostSave) every database record that matches the search criteria will be updated in it's own transaction. This means there is no transaction undo in case an error occurs during update, but this was necessary to prevent a lock table overflow on updates that can potentially update very large record sets.


Parameters


icTableNameinputcharacterDatabase table name
icPrepareinputcharacterProgress for each statement defining what record(s) must be updated.
icFieldListinputcharacterComma seperated list of field names to update.
If this list is empty, the record(s) to update will be deleted.
icFieldListDataTypesinputcharacterComma seperated list of data type of each field in icFieldList.

data type =
c (character)
d (decimal)
i (integer)
l (logical)
t (date)
icAbsoluteinputcharacterchr(2) seperated list of absolute values to write to the fields of icFieldList. The same value(s) will be written to each record to update.
Cannot be combined with icIncremental.
icIncrementalinputcharacterchr(2) seperated list of values to add to the fields of icFieldList. The same value(s) will be added in each record to update.
Fields to update are restricted to data types integer and decimal.
Cannot be combined with icAbsolute.
ihClassinputhandleHandle to the class that is using the persistence layer. In most of the cases, this handle will be available in the preprocessor {&TARGETPROCEDURE}.
icUserLogininputcharacter
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method business.ExitInstance
method business.InitInstance
method database.PostSave
method BBaseDaemonProcessor.LockWorkItem
method BBaseDaemonProcessor.SetWorkResult
method BBaseDaemonQueue.ApiClearDaemonQueue
method BControlProperty.RemoveCustomFieldFromUI
method BCustomField.PostSave
method BFcTranslation.ApiLoadBusinessTranslations
method BNumber.CommitNumber
method BNumber.GetNumber
method BNumber.ReleaseNumber
method BNumber.StoreNumber
method BQueryCache.RunQuery
method BSystem.ApiResetClientCacheIndication
method BSystem.PostTransaction
method BTimeOutDaemonProcessor.PerformWorkItem
method Housekeeping.ApplicationHousekeeping
method persistence.DeleteInstance
method Progress.CleanupStateOnline
method Progress.CreateDraftInstance
method Session.ExitInstance
method Session.IsTimedOut
method Session.SetDebugLevel
method TApplication.ResetConfigurations
method TApplication.StopApplication
method TDaemonUtility.StartDaemon
method TDaemonUtility.StartDaemonInternal
method TDaemonUtility.StopDaemon
method Transaction.CommitTransaction

QadFinancials
method BAutoNumber.GetAutoNumber
method BBaseDaemonProcessor.LoopForWorkAutoRecoverDaemons
method BBaseDaemonProcessor.UpdateSessionTimeStamps
method BBankImportLine.ProcessBankImpLineAction
method BBill.PostSave
method BBill.SetBillDate
method BBudgetRebuild.ApiRebuildBudget
method BCInvoice.PostSaveLegalDocument
method BCInvoice.PreSave
method BCInvoice.UpdateCInvoicesPaymentReference
method BDebtor.ApiUpdateOpenOrderTotal
method BDebtorBalance.PreSave
method BDInvoice.PostSave
method BDInvoice.PreSave
method BDPaymentSelection.AdditionalUpdatesDInvoice
method BDPaymentSelection.DeleteDPaySelLine
method BPosting.PostSave
method BPosting.PreSave
method BJournalEntry.ApiSetPostingStatusChange
method BJournalEntry.AutoUpdatePostingVatVatGroups
method BPaymentSelection.ApiChangePaymentSelInProcessing
method BPaymentSelection.ChangeStatusPaymentSelInBatch
method BPaymentSelection.ChangeStatusPaymentSelInProcessing
method BPaymentSelection.UpdatesCInvoiceIsSelected
method BQCrossCyPosting.ApiProcessQCrossCyPostingJE
method BReportingJournal.ApiUpdateReportingJournal
method BReportTree.DataLoadByInput
method BSharedSetMerge.MergeBeforeMerge
method BSharedSetMerge.MergeFinish
method BSharedSetMerge.MergeInitClearReferencesSameTable
method BSharedSetMerge.MergeProfiles
method BSharedSetMerge.MergeBeforeMergeGL


program code (program1/persistence.p)