Friday, March 9, 2012
How to get publisher name , publication name and publish database?
i want to write a winform to search publisher name , publication
name and publish database from local sql sever dynamicly.(C#),
So anyone can give some hints of what's method or function to get
publisher name , publication name and publish database from local sql sever?
Thanks
nick
Check out "Introducing Replication Programming", "Replication Object", and
"Samples" in Books online.
Donna
"nick" wrote:
> Hi All:
> i want to write a winform to search publisher name , publication
> name and publish database from local sql sever dynamicly.(C#),
> So anyone can give some hints of what's method or function to get
> publisher name , publication name and publish database from local sql sever?
>
> Thanks
> nick
>
>
Wednesday, March 7, 2012
How to get mobile subscription to sync with dynamic snapshot
Hello Everyone,
I have a publication on a Sql 2000 (SP4) server. This publication has dynamic filtering enabled. What I want to do is create an interface which will generate a new dynamic snapshot based on filtering input from users. So far I can create the dynamic snapshot easy enough and I can see the filtered results on a Sql 2000 subscriber. However, there seems to be no way to configure a mobile database to point to the dynamic snapshot. This is easy to configure in a Sql 2000 subscription - the options are right there are on the properties page. Yet, it seems like the mobile database only points to the required unfiltered snapshot through the IIS proxy.
Is there any way to force the mobile database to use the dynamic snapshot instead?
Thanks,
Mike
You can set the HOST_NAME() function in code to anything you want on the mobile app (using the SqlCeReplication object's HostName property), and use this is your publication filter.
Hope this assists.
|||
Thanks, Eric.
I thought of that as an option. However, I would rather use a Forms or a Web app to set HOSTNAME. If I set it in the Mobile App itself, then the users are going to be forced to try to enter the filtering criteria while the device is cradled, which would be clumsy at best.
Right now, I can set the HOSTNAME using the ActiveX replciation objects in a VB app, but it only seems to work on a dynamic snapshot.
|||Hi Mike,
I am not sure I understand - the users should be able to enter the criteria any time on the device (and save it in registry or a file). I assume that it is the users that select the hostname, not you. In the Device app you can add code to validate the entered hostname....
|||
Thanks, Erik.
That's actually a good idea. The app I am writing replaces a commercial app in which the users enter their filtering criteria in the Windows component of the system. The resulting data is then downloaded to the mobile device. I was stuck in that mindset. Yes, I could have them enter the information anytime with the understanding that the filter will not apply until the next time they synchronize with the host.
Thanks for the help!
Mike
|||If that answers your post, please remember to mark as answered, thanks.