Manage Learn to apply best practices and optimize your operations.

Insert more than 64K in a field

This tip describes how to insert more than 64K into a field.

If you have to insert more than 64K in a field, you can use use rich text rather than text field. If I have a field ("My_Id") that contains the Universal ID of some documents, I want to read in a variant and write from a variant:

TO READ :
Dim valueId As Variant
valueId = doc.GetItemValue("My_Id")

TO WRITE :
doc.ReplaceItemValue "My_Id", valueId

If I have more than 64 K, the text field don't work, I have to use rich text. Finally I have in my "valueId" variant all the Universal ID.


TO READ : 
Dim item As Variant
Set item = doc.GetFirstItem("My_Id")
Dim plainText$
If Not item Is Nothing Then
    plainText = item.text
    Redim valueId(0)
    Dim n As Double
    Dim k As Double
    k=0
    For n = 1 To Len(plainText)  Step 32
        If Len(Mid( plainText, n, 32)) < 32 Then
    Exit For
        End If
    If k <> 0 Then
        Redim Preserve valueId(k)
    End If

    valueId(k) = Mid( plainText, n, 32)
    k=k+1
    Next

End If 

TO WRITE : 
Forall xx In valueid
    Call item.AppendText( xx )
End Forall
  

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close