Filter Replicated Data???

  • I've developed a vb.net mobile application that replicates data back to sql server 2005. I now need to program a filter for pulling the replicated data. I can use HOST_NAME() to implement a single parameter filter, for example, RegionCode = '1111'. I can set HOST_NAME() = '1111' in my mobile application and this works when I synchronize the data. My problem is I need to pull multiple RegionCodes and can't figure out how to set this filter. For example, I need to filter RegionCode = '1111' or RegionCode = '2222'. It doesn't work when I set HOST_NAME() = '"1111", "2222"'. Can anyone be of assistance?

  • try HOST_NAME in ('111','222')

    Hope this is what you are looking for 🙂

  • I tried doing that...(I think)...:)

    On the SQL SERVER, I set a filter in the publication as follows: Select from Table where RegionNumber In (HOST_NAME())

    I then set the SqlCeReplication object's HostName parameter in my mobile application to "'1111','2222'" . But when I synchronize the data, I get no records back. I can set the HostName parameter in my code to '1111' or '2222' and I get data but when I try to combine the 2 values, i get nothing. Any suggestions?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply