Programatically set a database as high prioirity

Is there a way to programatically set a database as high priority? Either in Lotuscript or formula language?

Subject: Programatically set a database as high prioirity

What is a high priority on a database?

Subject: RE: Programatically set a database as high prioirity

That would be a replication setting. It can be accessed using the NotesReplication class.

Subject: RE: Programatically set a database as high prioirity

You are correct, it is the local mail database. I looked in the helpfile and found some good information. Thank you.

Subject: RE: Programatically set a database as high prioirity

I ran into a little snag in my programming. I put the following code into a button in an email. The Lotuscript window shows an error and highlights the Dim db statement. Any ideas of why? I looked over all the sample code I can find and cannot figure out why.

Sub Click(Source As Button)

Dim s As New NotesSession

Dim view As NotesView

Dim doc As NotesDocument

    Dim docMail As notesDocument

Dim db as Notes Database

Dim rep as NotesReplication



sNamesLine=s.GetEnvironmentString("NAMES", True)

nPos = Instr(sNamesLine, ",")

If nPos > 0 Then 

	sNamesLine = Left$(sNamesLine, nPos-1)

Else 

	sNamesLine = "names.nsf"

End If



Set db = New NotesDatabase( "",sNamesLine )



If Not(db.isOpen) Then 

	Messagebox("Could not locate your Name & Address book.")

	Exit Sub

End If





Set view = db.GetView("Locations") 



sLocation=s.GetEnvironmentString("Location", True)

nPos = Instr(sLocation, ",")

sLocation=Left$(sLocation, nPos-1)

Set doc=view.getdocumentbykey(sLocation)

Call doc.ReplaceItemValue("ReplicationEnabled", "1")

Call doc.ReplaceItemValue("ReplicateImmediate", "0")

Call doc.ReplaceItemValue("ReplicateAtStart", "0")

Call doc.ReplaceItemValue("PromptAtStart", "0")

Call doc.ReplaceItemValue("Enabled", "1")

Call doc.ReplaceItemValue("Interval", "60")

Call doc.ReplaceItemValue("Schedule", "8:00:00 AM-10:00:00 PM")

Call doc.ReplaceItemValue("WeekDays", "Mon, Tue, Wed, Thu, Fri, Sat, Sun")

            Call doc.ReplaceItemValue("ReplicateAtEnd", "")

            Call doc.ReplaceItemValue("ReplicateOutboxAtEnd", "")

            Call doc.ReplaceItemValue("ReplicateToBeSentAtEnd", "")

Call doc.ReplaceItemValue("HiPriorityReplication", "1")

Call doc.ReplaceItemValue("Schedule_HI", "8:00:00 AM-10:00:00 PM")

Call doc.ReplaceItemValue("WeekDays_HI", "Mon, Tue, Wed, Thu, Fri, Sat, Sun")

Call doc.ReplaceItemValue("Interval_HI", "15")

Call doc.Save(True, False) 



    Set docMail = s.CurrentDatabase.CreateDocument 

    docMail.Form = "Memo" 

    docMail.SendTo = "Quality/PTC/Schulman@Schulman"       

    docMail.CopyTo = "Update Complete"               

    docMail.Subject = "Location file changed by " + s.CommonUserName 

    Call docMail.Send(False) 



Set db = session.CurrentDatabase

Set rep = db.ReplicationInfo

Set rep.Priority = DB_REPLICATION_PRIORITY_HIGH

Call rep.Save()

End Sub

Subject: RE: Programatically set a database as high prioirity

There’s no space in NotesDatanase.