
Chapter 6. Quick start in Web application development 125
Example 6-4 CMaddAttr.jsp - Create attributes definition sample code
<%
DKDatastoreICM dsICM = new DKDatastoreICM(); // Create new datastore object.
dsICM.connect("LSDB","LSADMIN","lspasswd",""); // Connect to the datastore.
DKAttrDefICM attr = new DKAttrDefICM(dsICM);
attr.setName("BP_DOC_DESC");
attr.setDescription("BP_DOC_DESC");
attr.setType(DKConstant.DK_CM_VARCHAR);
attr.setSize(200);
attr.add();
%>
Attribute <%=attr.getName()%> has been added <br>
<%
attr = new DKAttrDefICM(dsICM);
attr.setName("BP_CODEBOOK_SUB");
attr.setDescription("BP_CODEBOOK_SUBJECT");
attr.s ...