Domino Code Fragment
| Code Name* CurrentDatabase property | Date* 12/17/2025 | Source (or email address if you prefer)* [email protected] IP address:.172.69.214.234 | |
| 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();
}
}
}