Thursday, December 06, 2007

This is an interesting little tidbit.     If you are using SQL Compact replicated down to a mobile device,  you often find that you want to clear out data on the handheld once it has been sent back to the server.

However rather than building an archiving process the simplest way to remove data is to filter it out.

Using SQL Server.   Its possible to set for any table a filter rule that achieves just this result.   

image

So by putting a where clause in that simply says where 1=0   means that once a record has been synchronised from mobile device back to server it is no longer on the mobile device.

Job done.

Technorati Tags:
Thursday, December 06, 2007 11:14:21 AM UTC  #    Comments [2]  | 

Theme design by Jelle Druyts

Pick a theme: