DroidDB Tip of the Month

DroidDB® Tip for May 2015

Deleting a Table From an Application

In the course of developing your application, you may decide to drop a table you are no longer using from the database. There are a few things to keep in mind when you do this.

DroidDB provides a menu command to drop a table from the handheld database (FILE | DELETE TABLE). This menu item will not only drop the table from the handheld, but it will also remove the synchronization settings and delete all the forms built over that table.

But, just as the synchronizer only synchronizes the data in the table (not the structure of the table), the synchronizer does not propagate the dropping of the table to the desktop/server database. You need to drop the table manually.

Most desktop/server databases provide a tool to drop a table from the database. You need to use that tool. Additionally, if the "Multiple handhelds synchronizing to the same table" setting was turned on in the synchronization settings, there is one other thing you must do.

In the desktop/server database, DroidDB created a table called SYWARE_SyncInfo. DroidDB uses SYWARE_SyncInfo to figure out which record on one handheld maps to which record on the desktop/server and the other handhelds. When dropping a desktop/server table, you must remove all the records in SYWARE_SyncInfo whose value in the column called "TableName" contains the name of the dropped table. If you fail to remove these records and you ever create a new table with the same name as the dropped table, the synchronizer will not work properly.

 

Back to List »

Visit our store

Top rated! I needed a solid database application development tool for mobile devices. I chose DroidDB for Android OS because it provided a way to get a strong product to market quickly. DroidDB is relational, gives me control over form layout, handles macros, and supports events. It works on all Android versions I have tried and is a great companion product to SYWARE’s VisualCE.

Mark Read, President
SyntegraTech, Inc.

signup for our newsletter