Date evaluation in publication filter
From: Janez (janezcas_at_yahoo.com)
Date: 11/25/04
- Next message: Juan: "How many tables"
- Previous message: pascal.psion: "RE: error with replication fusion - 29045 - sql ce 2.0 on a mobile"
- Messages sorted by: [ date ] [ thread ]
Date: 25 Nov 2004 09:14:49 -0800
Hi,
I have Orders table with field OrderDate, so I have created row filter
like this
SELECT <published_columns> FROM [dbo].[Orders] WHERE OrderDate >=
DateAdd(week,-1,GetDate())
(I want only orders that are not older than one week in the
subscription database)
This is the only filter in the database, no other table is filtered.
When I sync for the first time (add subscription), the date is
evaluated correctly.
If I add some orders to the subscription db for the current date and
synchronize immediately, all records will be still present in the
subscription db, which is correct, because they are not older than one
week.
Well, if I work then with the subscription database for more than a
week (eg. ten days) and then synchronize, records entered ten days ago
are not deleted from the subscription database, despite the fact they
are now older than one week.
I know that filter won't be evaluated if there were no changes to the
records, so I have updated them with the dummy update prior to
synchronization (eg. update Orders set OrderDate = OrderDate), but it
didn't help.
Can this be done the way I have described?
I know that filter will be evaluated if I specify Reinitialize, but I
do not want to do that, because I do not want to download new copy of
complete data to the device each time.
Regards
Janez
- Next message: Juan: "How many tables"
- Previous message: pascal.psion: "RE: error with replication fusion - 29045 - sql ce 2.0 on a mobile"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|