Search

Top Ten List

Of all my ramblings, people seem to find the following the most interesting:
  1. Pimp My Fields
  2. Using the WebBrowser control to view attachments inline
  3. Purty charts in Domino
  4. My approach to DbLookup and DbColumn in Javascript
  5. Mind Map of Database Design
  6. Design Catalog - version control for Domino
  7. Workaround for LotusScript event binding
  8. Clickable URL's in Notes view columns
  9. Every time you use window.open, God kills a kitten
  10. Create, edit, and delete without agents via AJAX

« Aw, Snap! | Main| Chaining methods in LotusScript »

Changing read-only database settings with DXL

Category show-n-tell thursday
In today's episode, we'll take a look at how DXL lets us easily update database settings that are typically considered read-only.

For example, in both LotusScript and Java the design template name is a read-only property of a database. The Notes API can of course be used to tweak this setting, but there's an easier way: a DXL import. The following routine illustrates how this can be done:

Public Sub SetDesignTemplateName (p_dbTarget As NotesDatabase, Byval p_strTemplateName As String)  Dim sesCurrent As New NotesSession  Dim dxliDatabaseProperties As NotesDXLImporter  Dim strmDXL As NotesStream  Set strmDXL = sesCurrent.CreateStream()  Call strmDXL.WriteText(|<?xml version='1.0' encoding='utf-8'?> <database title='| & p_dbTarget.Title &_  |' replicaid='| & p_dbTarget.ReplicaID &_  |' fromtemplate='| & p_strTemplateName & |' />|)  Set dxliDatabaseProperties = sesCurrent.CreateDXLImporter(strmDXL,p_dbTarget)  Let dxliDatabaseProperties.ReplaceDBProperties = True  Call dxliDatabaseProperties.Process() End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Contact Me

Hire Me

Elsewhere

What the Quote?

"It involves a flank, a beachhead, and a claymore. Solve for X."

Steven Rodgers

"Oh yeah. I forgot about Busta."

Laura Tripcony

"Ernie is the orange one, BIRT does the charts."

Julian Robichaux

"i can has cheezburger?"

lolcat

"Talking about sports at Starbucks is just like talking about a Yarn Barn event at ESPN Zone."

Mike Koenig

Apparel

Lotus Rocks

I write the code that makes the young girls cry

Current Terror Alert Level

Assorted Linkage

ClustrMap