Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Replication / July 2005

Tip: Looking for answers? Try searching our database.

A2K Display last successful sync time on form?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 19 Jul 2005 05:53 GMT
Hi All,

Is it possible to display the last successful sync date/time in a form in
the front end of a split database, where the Access 2000 backend is the
database being synchronized with Replication Manager?

Can you parse the synchronizer log somehow? Or is this info stored in the
system tables somewhere?

If it can't be done, is there any tips on how to help remote locations know
if their synchronizing isn't working daily as intended?

Thanks,

Mark
David W. Fenton - 19 Jul 2005 19:45 GMT
> Is it possible to display the last successful sync date/time in a
> form in the front end of a split database, where the Access 2000
[quoted text clipped - 7 lines]
> locations know if their synchronizing isn't working daily as
> intended?

I don't know that there's any documented method for getting this
information, but I've never searched for it.

MSysHistory should give you what you want. You'll probably want to
use your local replica's ReplicaID to filter it (that is a property
of the replicated data file), and then you can do a TOP 1 query on
the result sorted ascending by date. That also includes a result
code, but those are not always entirely clear (though you can always
tell if it failed or not).

Signature

David W. Fenton                        http://www.bway.net/~dfenton
dfenton at bway dot net                http://www.bway.net/~dfassoc

Mark - 20 Jul 2005 00:33 GMT
Hi David,

I don't have an MSysHistory table.

There's MSysGenHistory and MSysOthersHistory.. but the one I think I want is
MSysExchangeLog. Seems to contain everything I need and is only relevant to
the local database by the looks.

Thanks for your input.

Mark

>> Is it possible to display the last successful sync date/time in a
>> form in the front end of a split database, where the Access 2000
[quoted text clipped - 17 lines]
> code, but those are not always entirely clear (though you can always
> tell if it failed or not).
David W. Fenton - 20 Jul 2005 00:46 GMT
> I don't have an MSysHistory table.
>
> There's MSysGenHistory and MSysOthersHistory.. but the one I think
> I want is MSysExchangeLog. Seems to contain everything I need and
> is only relevant to the local database by the looks.

You're right -- I didn't look it up, and misremembered the name.
MSysExchangeLog is the right table.

It's important to use the ReplicaID and *not* the replica path,
since multiple replicas could be at the same path (which means dead
replicas, of course).

Signature

David W. Fenton                        http://www.bway.net/~dfenton
dfenton at bway dot net                http://www.bway.net/~dfassoc

Mark - 20 Jul 2005 02:05 GMT
Hi David,

Please correct me if I am wrong, but from what I can see, the
MSysExchangeLog looks like it refers to the local databases interaction with
other databases only.
That is, I don't think it is a replicated table with other databases in the
set and doesn't contain replication exchange information about other
replicas..

So I don't think filtering by replica ID is required in this case?

If I am wrong, do you know where is the local Replica ID stored? I.e. if I
want to filter a table, how do I know what to filter it against?

Thanks,

Mark

>> I don't have an MSysHistory table.
>>
[quoted text clipped - 8 lines]
> since multiple replicas could be at the same path (which means dead
> replicas, of course).
David W. Fenton - 20 Jul 2005 20:32 GMT
> Please correct me if I am wrong, but from what I can see, the
> MSysExchangeLog looks like it refers to the local databases
> interaction with other databases only.
> That is, I don't think it is a replicated table with other
> databases in the set and doesn't contain replication exchange
> information about other replicas..

Yes, I guess that's correct, but you still need to know which
*remote* replica you're selecting, so you'll need the ReplicaID of
*that* replica in order to filter accordingly.

Of course, if your replica has never synchronized with but one
replica, that's not going to be a problem, but I'd never make such
an assumption.

> So I don't think filtering by replica ID is required in this case?

It is for the remote replica.

> If I am wrong, do you know where is the local Replica ID stored?
> I.e. if I want to filter a table, how do I know what to filter it
> against?

Currentdb().ReplicaID gives you the ReplicaID of the replicated MDB
open in the Access UI. It's a property of the database object. So
all you have to do is:

 Dim db As DAO.Database

 Set db = DBEngine(0).OpenDatabase([remote replica path])
 Debug.Print db.ReplicaID
 db.Close
 Set db = Nothing

I have never dealt with GUIDs, so I don't know exactly how you
process that result into a string.

Signature

David W. Fenton                        http://www.bway.net/~dfenton
dfenton at bway dot net                http://www.bway.net/~dfassoc

David W. Fenton - 20 Jul 2005 20:42 GMT
> Please correct me if I am wrong, but from what I can see, the
> MSysExchangeLog looks like it refers to the local databases
[quoted text clipped - 8 lines]
> I.e. if I want to filter a table, how do I know what to filter it
> against?

A second followup, just having done some investigating in the
properties collection of a replicated MDB.

 CurrentDB.Properties("MostRecentSyncPartner")

gives you the GUID of the last replica you synched with.

But that is not stored in MSysExchangeLog. Only the RemoteNickname
is stored there.

So, you could use the MostRecentSyncPartner property to get the
GUID, then look up the nickname from MSysReplicas, then use *that*
to filter the MSysExchangeLog table to just synchs with that remote
replica.

Signature

David W. Fenton                        http://www.bway.net/~dfenton
dfenton at bway dot net                http://www.bway.net/~dfassoc

Mark - 21 Jul 2005 00:09 GMT
Hi David,

Thanks so much for this, i've got it working now.

I appreciate you taking the time to help me out.

Mark

>> Please correct me if I am wrong, but from what I can see, the
>> MSysExchangeLog looks like it refers to the local databases
[quoted text clipped - 23 lines]
> to filter the MSysExchangeLog table to just synchs with that remote
> replica.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.