Is this possible with the C API?

Hi,

is there a possibiliy to copy design elements from one NSF-Database to another by using the C API?

I have to design a database which extends the address book with additional fields. My idea is, not to alter the names itself, but to create a central database to which other databases subscribe. This central database would then copy a specified subform from the subscribing database, change the name to an internal representation and add this subform to the appropriate forms (which have almost the same functionality as the forms in the names.nsf). Additionaly there would be some type of garbage collection. Field that aren’t used by any subform anymore would then be erased from this central database.

I didn’t find a possibility to implement this with normal notes programming, so I think about using the C API. Do you think that it’s possible to realize this database functionality with the C API?

Thanks for your anwers,

Florian Wiesner,

stutent at the Technical University of Munich, Germany

Subject: Is this possible with the C API?

Bearing in mind that design elements are essentially “notes” within an NSF, then moving such things around – between database and so forth – is not a big deal. You can do this with the C API, no problem, but of course, you can also do it with Lotusscript.

There are tricks documented in the R4 / R5 forum for creating views that display design elements, and Damien Katz’ DbDesign class (Sandbox) also has some functionality for manipulating design elements programmatically. You can assign a NotesDocument object to design elements fairly easily, which may well get you where you want to go with this.

I’d certainly look at all these options first, before delving into the C API.

HTH

Subject: Or check out the XML import/export functionality in R6…

After exporting the design elements, it’s very easy to change the XML document before importing it into another database.

Subject: Yes, can be done

Take a look at the C or C++ APIs here:http://www-10.lotus.com/ldd/notesua.nsf/6c87a7297ac2aa718525698100519109/1a9c0035042e3e9d852569930062f063?OpenDocument

Also, specifically for adding subforms, check out STATUS LNPUBLIC SubformInsert()

Grüße an die TU :slight_smile:

Thomas - IBM