Can anyone point me towards a source code listing for a working replication
custom resolver written in .Net (C, VB etc dont mind which)?
I just need the skeletion of it and not the actually implementation of the
conflict resolution.
cheers
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"msnews.microsoft.com" <nospam_nige66_@.hotmail.nospam> wrote in message
news:%23nNkqybcFHA.1556@.TK2MSFTNGP10.phx.gbl...
> Can anyone point me towards a source code listing for a working
replication
> custom resolver written in .Net (C, VB etc dont mind which)?
> I just need the skeletion of it and not the actually implementation of the
> conflict resolution.
> cheers
>
|||Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"msnews.microsoft.com" <nospam_nige66_@.hotmail.nospam> wrote in message
news:%23nNkqybcFHA.1556@.TK2MSFTNGP10.phx.gbl...
> Can anyone point me towards a source code listing for a working
replication
> custom resolver written in .Net (C, VB etc dont mind which)?
> I just need the skeletion of it and not the actually implementation of the
> conflict resolution.
> cheers
>
|||Try chapter 30 from the resource kit. You can get it online at
http://www.microsoft.com/resources/d...rt8/c3061.mspx
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"msnews.microsoft.com" <nospam_nige66_@.hotmail.nospam> wrote in message
news:%23nNkqybcFHA.1556@.TK2MSFTNGP10.phx.gbl...
> Can anyone point me towards a source code listing for a working
replication
> custom resolver written in .Net (C, VB etc dont mind which)?
> I just need the skeletion of it and not the actually implementation of the
> conflict resolution.
> cheers
>
|||Been there.... its only covers vb (not dotnet) and no sample code either
(the samples from SQL devtools are old vb - again not in even in dotnet)
I'm *really* after an experienced developer who has done SQL with
replication and has some code as BOL, RK, Google etc has turned up nothing
of use
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eSqhs6bcFHA.3504@.TK2MSFTNGP12.phx.gbl...
> Try chapter 30 from the resource kit. You can get it online at
> http://www.microsoft.com/resources/d...rt8/c3061.mspx
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "msnews.microsoft.com" <nospam_nige66_@.hotmail.nospam> wrote in message
> news:%23nNkqybcFHA.1556@.TK2MSFTNGP10.phx.gbl...
> replication
>
|||But you must use COM, the merge replication subsystem doesn't understand
anything else - even in SQL 2005 it still (from my reading of the
documentation) uses COM.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"msnews.microsoft.com" <nospam_nige66_@.hotmail.nospam> wrote in message
news:%239nYDNccFHA.2768@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Been there.... its only covers vb (not dotnet) and no sample code either
> (the samples from SQL devtools are old vb - again not in even in dotnet)
> I'm *really* after an experienced developer who has done SQL with
> replication and has some code as BOL, RK, Google etc has turned up nothing
> of use
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eSqhs6bcFHA.3504@.TK2MSFTNGP12.phx.gbl...
http://www.microsoft.com/resources/d...rt8/c3061.mspx
>
|||Exactly - but I need a resolver written in dotnet (so I can call managed
code) but need it to expose itself as com for SQL. The more I'm reading it
does seem to me that again the next version of SQL is not the major upgrade
that it should be. I'm all for backward compatibility but it would be nice
if we could take a step forward without nailing one foot to floor.
Still on the look out for a solution for what is a really simple problem -
the lines of code I want to call amount to probably no more than 5 yet SQL
seems to hinder at every turn - perhaps I should swap out the database
backend from SQL and use Exchange instead ;-)
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23%23VjOGecFHA.2520@.TK2MSFTNGP09.phx.gbl...
> But you must use COM, the merge replication subsystem doesn't understand
> anything else - even in SQL 2005 it still (from my reading of the
> documentation) uses COM.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "msnews.microsoft.com" <nospam_nige66_@.hotmail.nospam> wrote in message
> news:%239nYDNccFHA.2768@.tk2msftngp13.phx.gbl...
> http://www.microsoft.com/resources/d...rt8/c3061.mspx
>
|||All you have to do is creating a COM component that implements the
ICustomResolver interface. Make sure you have selected the 'Register for COM
interop' setting in the project-properties in Visual Studio. And you have to
use the regasm utility.
good luck,
Marco
// just a small example:
using System;
using System.Runtime.InteropServices;
using SQLResolver;
using System.Data;
using System.Xml;
namespace ReplicationConflictResolver
{
[GuidAttribute("12877204-7044-4abc-9833-3B839427972C")]
public class ThisConflictResolver : ICustomResolver
{
public ThisConflictResolver()
{
}
#region ICustomResolver Members
public void Reconcile(IReplRowChange pRowChange, int dwFlags,
IReplRowChange pvReserved)
{
// Determine the type of change condition
REPOLE_CHANGE_TYPE changeType;
pRowChange.GetChangeType(out changeType);
// Handle the conflict
switch (changeType)
{
case REPOLE_CHANGE_TYPE.REPOLEChange_DownloadDeleteFail ed:
{
// Handle this particular conflict, by rollbacking the change
pRowChange.DoDummyUpdate(REPOLE_BOOL.REPOLEBool_TR UE,
REPOLE_BOOL.REPOLEBool_FALSE);
}
case .......
}
public void GetHandledStates(ref int ResolverBm)
{
ResolverBm = (int) (REPOLE_CHANGE_TYPE.REPOLEAllConflicts |
REPOLE_CHANGE_TYPE.REPOLEAllErrors );
}
#endregion
}
}
"msnews.microsoft.com" wrote:
> Can anyone point me towards a source code listing for a working replication
> custom resolver written in .Net (C, VB etc dont mind which)?
> I just need the skeletion of it and not the actually implementation of the
> conflict resolution.
> cheers
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment