Tip of the Month (March 2011) Synchronizing Tables with Foreign Key (One-to-Many) Relationships The Visual CE synchronizer synchronizes one table at a time. It completely synchronizes one table before synchronizing the next. If you have foreign key (one-to-many) relationships this may cause a problem. What is that problem? If you have insertions, the the parent records have to be inserted before the child records are inserted. If you have deletions, the child records have to be deleted before the parent records are deleted. So there is no sequence of table synchronization that will work in all cases. But, there are some work arounds:
The only question that remains is how to control the order the tables are synchronized. In the windows folder of the desktop/server machine there is a file called WCEODBC.INI. Open this file with a text editor such as notepad. You will see a section called [VICESYNC] and a section called [VICEMNGR]. Ignore those two sections. The rest of the file contains one section for each table. The tables are synchronized in the same order that their sections appear in the WCEODBC.INI file. Carefully rearrange these sections to the desired order (we suggest that you make a backup copy of the WCEODBC.INI file before making any changes to it). Previous Tips of the Month |