Community
Showing results for 
Search instead for 
Do you mean 
Reply

Remote Databases

Accepted Solution Solved
Astute Commentator
Posts: 22
Country: United_Kingdom
Accepted Solution

Remote Databases

Can you tell me how we get to the object model which tells us how many remote databases have been set up and their status and date of last sync etc.


Accepted Solutions
Solution
Accepted by sam_raikes (Copper Super Contributor)
‎09-25-2015 03:20 AM
Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: Remote Databases

Welcome Donald! :-)

 

This should get you going:

 

    public int countRemotes()
        {
            try
            {
                //get an array of SyncDbs
                SyncDB[] syncDbsArray = oActFwk.SynchronizationManager.GetAllRemoteSyncDBs();

                //convert the array to a list
                List<SyncDB> syncDbsList = new List<SyncDB>();
                foreach (SyncDB db in syncDbsArray)
                { syncDbsList.Add(db); }

                //count the list
                return syncDbsList.Count;
            }
            catch (Exception)
            {
                return 0;
            }
        }

Usage:

 

MessageBox.Show(countRemotes().ToString());

 SyncDB exposes the other properties you're looking for.

 

Regards,

 

 

Russell

 

View solution in original post


All Replies
Solution
Accepted by sam_raikes (Copper Super Contributor)
‎09-25-2015 03:20 AM
Copper Super Contributor
Posts: 52
Country: United_Kingdom

Re: Remote Databases

Welcome Donald! :-)

 

This should get you going:

 

    public int countRemotes()
        {
            try
            {
                //get an array of SyncDbs
                SyncDB[] syncDbsArray = oActFwk.SynchronizationManager.GetAllRemoteSyncDBs();

                //convert the array to a list
                List<SyncDB> syncDbsList = new List<SyncDB>();
                foreach (SyncDB db in syncDbsArray)
                { syncDbsList.Add(db); }

                //count the list
                return syncDbsList.Count;
            }
            catch (Exception)
            {
                return 0;
            }
        }

Usage:

 

MessageBox.Show(countRemotes().ToString());

 SyncDB exposes the other properties you're looking for.

 

Regards,

 

 

Russell