Domino Code Fragment
Code Name* CurrentDatabase property | Date* 04/28/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.18.218.168.16 | |
Description* This example prints the title of the current database. | Type* Java | Categories* (Misc) |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class currentdatabaseagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
Database db = ac.getCurrentDatabase();
String title = db.getTitle();
System.out.println
("Current Database is \"" + title + "\"");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}