NetTalk Central

Author Topic: CapeSoft.NetTalk.Do Not Sync this Table  (Read 2989 times)

KC Chin

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • Email
CapeSoft.NetTalk.Do Not Sync this Table
« on: December 25, 2018, 02:19:32 AM »
Why it generates after setting the Table Option to NOSYSNC?

Kindly refer to the 3 attachments.

Regards
Chin

KC Chin

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • Email
Re: CapeSoft.NetTalk.Do Not Sync this Table
« Reply #1 on: December 25, 2018, 08:12:22 PM »
Instead of NOSYNC=1 to filter out the Memory File and Alias

Extracted and Created a #Control(MyNetTalkClientSyncControls ...,  myNTClientSync.tpw
from the NetTalk.tpl(#Control(NetTalkClientSyncControls ... ) and others template code that its needed.

search for 
#FOR(%File),Where(%FileType='FILE')

and added

#!v--kcchin
    #IF ((%FileType <> 'FILE' and not (%FileType = 'ALIAS' and %IncludeAliases = 1)) or (%FileDriver = 'MEMORY'))
      #cycle
    #ENDIF
#!^--kcchin

to filter out all the In-Memory driver.
(used the template code from FM3. he he he)

And next modification will be (on my list)
1. like looking at FM3 again of how to get those Procedure File instead of Generate All File Declaration.
2. Use TableList (eg:from FM3) to Exclude/Include the Files for Desktop Client Sync.

Due to some Desktop Sync app only sync its own tables from the same dictionary (as used by other app)

I am had to modify the above to minimize the number of Table where ServerSync create those tables that are not necessary for Desktop Sync, which are 100+ of tables.

« Last Edit: December 25, 2018, 08:42:17 PM by KC Chin »

KC Chin

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • Email
Re: CapeSoft.NetTalk.Do Not Sync this Table
« Reply #2 on: December 26, 2018, 07:34:19 AM »
As stated recently,

And next modification will be (on my list)
1. like looking at FM3 again of how to get those Procedure File instead of Generate All File Declaration.
2. Use TableList (eg:from FM3) to Exclude/Include the Files for Desktop Client Sync.

Done after a good shower!

copy some code from NetTalk.tpl instead of FM3(it does helps to make me understand)
and test for the hack of testing.

This template is for my own use and lazy to delete or omit unwanted tables from the Desktop Client Sync, ServerSync Procedure.

Those are interested, use it at your own risk.
« Last Edit: December 26, 2018, 07:38:33 AM by KC Chin »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: CapeSoft.NetTalk.Do Not Sync this Table
« Reply #3 on: December 27, 2018, 03:25:58 AM »
Hi KC,

The key is in managing the tables added to the TableListQueue in the ClientSync procedure.
As you noted it's not observing the NOSYNC option, which I've now added for the next build;

After
  #FOR(%File),Where(%FileType='FILE')
Should be
    #IF(Extract(%FileUserOptions,'NOSYNC',1)=1)
      #CYCLE
    #ENDIF 

(note I tend to use 1 rather than "true" when setting the option.)

the #for, as in
  #FOR(%File),Where(%FileType='FILE')
Should already exclude ALIAS's as it's only looking for items of type "FILE".

I don't think it would be good to generically filter out MEMORY tables, as I'm aware of some folk that _only_ use MEMORY tables at the client side, and sync to the server.

Cheers
Bruce