Vikash Talanki - 2011-09-22

Hi,

       I am trying to retrieve the forms in a database. I use the following code

DNotesFactory factory = DNotesFactory.getInstance();
DSession session = factory.getSession();
DDatabase database = session.getDatabase("", "Employee.nsf");
List testnames = database.getForms();
System.out.println(testnames.size());

I already a form in my database but I am getting the output as 0. The same this happens when I use DDatabase.getViews() for getting number of views even though I have 2 views in my db.

However If I use

DForm formname=database.getForm("employee_form");//employee_form being the name of my form in db
List fields = formname.getFields();
System.out.println(fields.size());

I am getting the output as 4 which is exactly correct.

I am stuck at using getForms() and getViews(). Plz resolve my issue