|
-
Sep 10th, 2002, 09:47 AM
#1
Thread Starter
Hyperactive Member
Database Replica - Conflict Tourment
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:
Public Function Sync(ReplicaName As String, DesignMaster As String, SyncMode As String, SyncType As String) As Boolean
On Error Resume Next
Dim repMaster As New JRO.Replica
Dim Conn As New ADODB.Connection
Dim rstConflicts As New ADODB.Recordset
'Start the Animated Cursor
NewCursor (App.Path & "\drum.ani")
' Open the database.
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data source=" & DesignMaster & ";"
repMaster.ActiveConnection = Conn
' Synchronize the values.
repMaster.Synchronize ReplicaName, SyncType, _
SyncMode
Set rstConflicts = repMaster.ConflictTables ' Important
MsgBox rstConflicts.RecordCount ' Important
Set rstConflicts = Nothing
' Return the default cursor
OldCursor
Set repMaster = Nothing
Set Conn = Nothing
If Err.Number <> 0 Then
DirectSync = False
intNum = Err.Number
strDesc = Err.Description
Else
DirectSync = True
intNum = Err.Number
strDesc = Err.Description
End If
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|