Hi,

I have been using the JRO to Synchronize the MS Access "Design Master" Database with its Replicas.

I came to a point where I knew I would have to deal with Conflicts.

I was quite unsure of how to resolve these annoying but very apparent issues.

So I wrote this :

VB Code:
  1. Public Function Sync(ReplicaName As String, DesignMaster As String, SyncMode As String, SyncType As String) As Boolean
  2. On Error Resume Next
  3.    
  4.     Dim repMaster As New JRO.Replica
  5.     Dim Conn As New ADODB.Connection
  6.     Dim rstConflicts As New ADODB.Recordset
  7.    
  8.     'Start the Animated Cursor
  9.     NewCursor (App.Path & "\drum.ani")
  10.    
  11.     ' Open the database.
  12.     Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  13.         "Data source=" & DesignMaster & ";"
  14.    
  15.     repMaster.ActiveConnection = Conn
  16.  
  17.     ' Synchronize the values.
  18.     repMaster.Synchronize ReplicaName, SyncType, _
  19.         SyncMode
  20.        
  21.     Set rstConflicts = repMaster.ConflictTables ' Important
  22.    
  23.     MsgBox rstConflicts.RecordCount ' Important
  24.    
  25.     Set rstConflicts = Nothing
  26.  
  27.     ' Return the default cursor
  28.     OldCursor
  29.  
  30. Set repMaster = Nothing
  31. Set Conn = Nothing
  32.  
  33. If Err.Number <> 0 Then
  34.     DirectSync = False
  35.     intNum = Err.Number
  36.     strDesc = Err.Description
  37. Else
  38.     DirectSync = True
  39.     intNum = Err.Number
  40.     strDesc = Err.Description
  41. End If
  42. End Function

You will notice the "rstConflicts = repMaster.ConflictTables " line within the code, apparently (from what Microsoft informs me throught their JRO help file), the .ConflictTables property from the JRO.Replica passes a recordset containing two columns : TableName and ConflictTableName. So In theory I should be able to pass the ConflictTables Property to an ADODB.Recordset and at least get the record count?

But, with this code I get nothing at all, not a sausage, and I know for a fact that I have got the conflicts table in both my replica and my design master.

Have I gone finally mad and I a completely way off the mark here. Or have uncovered the greatest mystery this earth has ever seen?

Regards,


Matt