LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Show details for Online resourcesOnline resources
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: Mail6.ntf database getting corrupted

Mail6.ntf database getting corrupted (by Normunds Kalnberzins, 09/05/2005 02:42:45 PM)

Sorry, for the late answer. And in fact I can hardly add anything meaningful. You add field placeholders to RT field. Apart from some error on your part you are not concerned with anything else in particular template, nor should other parts of template care about your structures. All you could do is to screw it up or not. Nothing else in template could matter; well some kind of db wide settings could possibly interact, but that would be too far a shot.

So you overwrite the previous content of this $Body field with your modified rich text content. Either you manage to write back everything nicely or not. Once you post here I assume you use C API calls from LotusScript. There is one trap I can think about, that I suspect you may have fallen into. Sometimes block offset is between 32K and 64K; it's negative for LS Integer and a normal positive value for unsigned short. If you do not carefully add "blockid.block" taking into account that the value may sometimes be a "negative integer" (really unsigned short in C) it may work for lots of situations while "block" is <32K. Then some part of data gets stored with large offsets and your code starts to write or interpret data incorrectly and maybe screws up something somewhere else in RT field or maybe in some other structures.

Other than that you can try and copy the content of the form's $Body field from the mail template to your private Db that you say works correctly, and see if it still works correctly. If it works (you probably did this to test your code), then it's some obscure catch like the one described above.

Did this help?