Synchronisation uploads the [[Invantive Control for Excel/Concepts/Pending Change|pending changes]] and then downloads fresh data; see [[Invantive Control for Excel/Concepts/Synchronization|Synchronisation]]. It touches the workbook, the model and the connected platform at once, so a failure can come from any of the three. The message code says which. Where the button itself cannot be pressed, the cause is a different one; see [[Synchronize Is Disabled]]. ## The Data Is Not the Newest Synchronising does not always reach the platform. The query behind a block is answered from a cache where the platform warrants it: an on-premises database such as Microsoft SQL Server is fast enough to be asked again every time, while a cloud platform such as Exact Online is served from a cache to stay within its API limits. An identical query therefore returns the answer of the previous synchronisation. The caches are empty directly after logging on. To be certain of data including changes made in the platform since the last synchronisation, log on again first and then synchronise. ## The Model Cannot Write Back - `itgensnc001` and `itgensnc006`: a block on which inserting, updating or deleting is allowed has no primary key column. Writing back uses optimistic locking, so the row being changed has to be identifiable. Name the primary key column on the block, or clear the three permissions where writing back is not wanted at all. Only the fields which the model marks as changeable are written back; that is a property of each field. ## The Query No Longer Resolves - `itgensdf031` and `itgengpr015`: a block cannot be refreshed because a table is unknown. The message lists the alternatives it does know. Two causes account for nearly all of these. - The query uses a table reference in a syntax which is no longer supported. Write references as `"Catalog"."Schema"."Table"`, in which catalogue and schema may be omitted. - The table lives behind an interface which was not enabled at log on. Exact Online is reached through both REST and XML interfaces, and each is a separate choice in the log-on window. - `itgenuck001` and `itgenuck002`: an Excel formula could not be calculated because "Include REST APIs" respectively "Include XML APIs" was not ticked at log on. Tick the option and log on again. ## The Workbook Gets in the Way - `itgenuty544`: the value of an Excel formula could not be determined. This happens when the workbook is open in Protected View, which is the yellow bar Microsoft Excel shows above the worksheet. Enable editing, close the workbook and open it again without closing Microsoft Excel in between; Excel then remembers the choice. - `itgensdf073` together with `itgenuty438`: rows could not be inserted, after which the backup of the worksheet could not be restored either. The worksheet has content in the last rows, near row 1,048,576, so there is no room to move the remaining cells down. Select every row below the last row which genuinely holds data, with Ctrl+Shift+End, and delete them. - `itgensdf040`: a warning, not an error. The model is about to be synchronised with a different facts database than the previous time. Each model records the identification of the data container it last exchanged data with. Continue only when the change is intended, since the model and the database can otherwise be brought out of step. ## The Platform Breaks Off - `itgenexl148`: the platform answered `401 Not authorised`. The logged-on user lacks a right in the platform itself, not in Invantive Control for Excel. The administrator of the platform grants it. - `itgenclr006`: an object was already disposed of. In practice the web connection to the platform dropped, usually after a time-out on a large request. Close Microsoft Excel completely, check in Task Manager that no `Excel.exe` remains, start it again and synchronise once more. A synchronisation which becomes steadily slower or stalls is usually a matter of volume rather than a defect: cloud platforms cap the number of API calls per minute and per day. Retrieving less, or retrieving incrementally, is then the remedy rather than retrying. ## From VBA Synchronisation can be started from VBA with [[I_SYNC_UPLOAD]], [[I_SYNC_DOWNLOAD]] and [[I_SYNC_ALL]]. The model must be enabled on the [[Invantive Control for Excel/User Interface/Modeler Ribbon|Modeler ribbon]] for these to do anything. There is no counterpart in the other direction: VBA cannot be started when a synchronisation finishes. A model trigger can, and it holds Invantive PSQL rather than VBA.