Update Approaches¶
Updating is the process of synchronizing changes between M-Files and the SQL class tables. Updates can be initiated from either side (M-Files to SQL or SQL to M-Files) and can be full table updates or incremental updates. The update procedures support a range of patterns and strategies to suit different use cases, performance needs, and data quality requirements.
Core Update Paths¶
Bulk full table updates from M-Files to SQL (no filtering).
Incremental updates from M-Files to SQL.
Filtered updates from M-Files to SQL (e.g. by date, user, object or group of objects).
Bulk update of object versions from M-Files to SQL.
Bulk updates from SQL to M-Files (no filtering).
Filtered updates from SQL to M-Files (e.g. by date, user, object or group of objects).
Deleting or undeleting objects in M-Files.
Deleting object versions in M-Files.
The synchronization strategies outlined in Synchronization Strategies set when and how to updates will take place, while this section provides the necessary details to implement those strategies effectively by using the different paramaters of the procedures.
Update from M-Files to SQL¶
Update from SQL to M-Files¶
Delete / Undelete in M-Files¶
Batch Flag Pattern¶
UPDATE dbo.MFCustomer
SET Process_ID = 42
WHERE LastModified > DATEADD(day,-2, SYSUTCDATETIME());
EXEC dbo.spMFUpdateTableInternal
@TableName = N'MFCustomer',
@Process_ID = 42,
@UpdateDirection= 1; -- SQL -> M-Files
Change History¶
When tracking incremental modifications internally (e.g. using a shadow table or triggers), spMFUpdateObjectChangeHistory can limit outbound update cost.
Multi-Value & Lookups¶
Normalize or resolve lookup foreign keys before marking rows for update; ambiguous or placeholder keys cause connector exceptions.