Hi Heinz,
>> This I need, because in one case on the server there are > 100.000 records, the client only should get ~20 of these records, starting with an empty table, and the filter on client side here is very much to slow, it takes than half an hour even if the
server and client are on the same computer.
Of course filtering on the server side is much, much better than filtering on the client side.
<< - in my case I have a main table with serveral sub tables. The main table is this where the client should get the mentioned 20 records. All the sub records of these 20 main records should be synced to the client, but only they, not the complete sub tables (these may contain > 100.000 records each).
<< How can I filter them on server side to get a fast sync? If I filter them on client side all 100.000 records have to be sent and checked, and only lets say 100 are ok and are inserted in the client table.
It's not hard to do a filter on the server side so that only applicable child records are sent.
For example, say I wanted to Sync Invoices, and only Invoices belonging to the customer. Then obviously I also need to filter Line Items so that only the line items for the passed invoices are sent.
So I can use a VIEW, join the line items to the Invoice, do a filter on the Invoice fields, and hence end up with just the line items for the invoices that are ok. This is a pretty basic filter....
>> - The main table in addition to the GUID field has an autonumbered order number field. If a client creates a new order and this is synced to the server it may be, that the order number of the client already is used on the server.
Auto-numbering is done "server side". So the client does not set the order number at all. You can use a placeholder there if you like, but the client will not know the order number until only _after_ the order has been sync'd.
On the server side the auto-number field is populated (and the new value is sent back to the client.)
>> Therefore I create a new order number in PrimtFields:File.
On the server or the client? You should do this on the server side.
>> This works so far. But if after the first sync, where the record gets to the server with a new order number,
the record should get to the server with no order number.
>> the record is changed on the client, the server record is not updated again. I saw that the problem starts in SyncRecord:File because the record on client side has no ServerTimeStamp and therefore is look at as an incoming insert.
Should the record be resynced from the server to get back the ServerTimeStamp?
When a record is changed on the server, it will get a new TimeStamp and a new ServertimeStamp.
Then this record will automatically be sent back to the client, because the new timestamp will be after the "EverythingAfter" setting. (which is part of the return filter.)
>> The next step is, that if I get an error in InsertRecord:File (Duplicate) the next check is ReallyTheSame:File, but this does not result in a positive result because the order number is different. How can I manage this case?
I suspect if you do it right, passing up order number 0, this issue goes away.
>> - If I have the described situation that after the first sync there is an order on the server with different order number, but same GUID as on the client, and then on the server the record is changed, should this change be synced to the client with the next snyc? This does not happen.
then there's a problem in your returns sync.
Cheers
Bruce