spMFUpdateItemByItem¶
Signature¶
EXEC dbo.spMFUpdateItemByItem
@MFTableName = N'MFCustomer',
@WithTableAudit = 0,
@RetainDeletions = 0,
@SingleItems = 1,
@SessionIDOut = NULL OUTPUT,
@Debug = 0;
Returns¶
INT: 1 on success; -1 on error.
Parameters¶
- @MFTableName
Type: VARCHAR(100)
Required: Yes
Description: Name of the table to be updated.
- @WithTableAudit
Type: BIT
Required: No (default = 0)
Description: When 1, perform a table audit and include only non-processed items.
- @RetainDeletions
Type: BIT
Required: No (default = 0)
Description: Set to 1 to retain deletions in the class table.
- @SingleItems
Type: BIT
Required: No (default = 1)
Description: Process items one-by-one.
- @SessionIDOut
Type: INT
Required: No (OUTPUT)
Description: Session id used to update results in
MFAuditHistory
.
- @Debug
Type: SMALLINT
Required: No (default = 0)
Description: Debug level.
Purpose¶
This procedure is useful when forcing an update of objects from M-Files to SQL, even if the version have not changed. This is particular handly when changes in M-Files has taken place that did not trigger a object version change such as changes to objects and valuelist labels and external repository changes.
This is also useful when there are data errors in M-Files and it is necessary to determine which specific records are not being able to be processed.
Additional Info¶
Note that this procedure use updatemethod 1 by default. It returns a session id. this id can be used to inspect the result in the MFAuditHistory Table. Refer to Using Audit History for more information on this table
Examples¶
DECLARE @RC INT
DECLARE @MFTableName VARCHAR(100) = 'MFCustomer'
Declare @WithTableAudit bit = 1
DECLARE @Debug SMALLINT = 101
DECLARE @SessionIDOut INT
EXECUTE @RC = [dbo].[spMFUpdateItemByItem]
@MFTableName
,@WithTableAudit
,@Debug
,@SessionIDOut OUTPUT
SELECT @SessionIDOut
Changelog¶
Date |
Author |
Description |
2021-08-26 |
LC |
fix return value to 1 for success |
2021-08-26 |
LC |
Add parameter for RetainDeletions |
2021-03-27 |
LC |
Change parameters |
2021-03-27 |
LC |
Add option to perform table audit |
2021-03-09 |
LC |
Update documentation |
2020-08-28 |
LC |
Set getobjver to date 2000-01-01 |
2020-08-22 |
LC |
Update for new deleted column |
2019-08-30 |
JC |
Added documentation |