NetTalk Central

Author Topic: Netsync recap...  (Read 4641 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Netsync recap...
« on: August 23, 2019, 06:27:27 AM »
Bruce,
This old app use a MsSql SP to autonumber records IDs
all IDs are unique between DBs bacause of the SP code
then they can be synced with no problem
the driver string for the tables is like:

/AUTOINC='exec dbo.spautoinc ''Products'',''ID'' ' /PREAUTOINC=TRUE /VERIFYVIASELECT=TRUE /BUSYHANDLING=2

It works ok using insert() but... it works too using ADD (the driver always runs the SP)
then when I sync with NetSync, when ADDing, the ID is changed because the SP calculates it again.

To avoid this, I need to use a different driverstring in the synced table to avoid the SP run.
This can be done using an Alias, with an Alias I have the same record struct and a different driverstring.

I realized that the sync proc does not add Alias tables to the queue.

Then Ive tried this forcing the add of the Products_1 (product alias) to the sync queue and coding the view manually and it works OK!

Adding records over the Products table you get the ID and adding with Products_1 the ID is not recalculated.

Any way to allow the sync proc to add an alias to the sync queue?
May be with some dct Option/property?
« Last Edit: August 23, 2019, 07:37:32 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Netsync recap...
« Reply #1 on: August 23, 2019, 10:08:25 PM »
I'll look at adding a property for the future, but if manually adding the alias to the queue works, then do that for now.

Cheers
Bruce