Trying to copy from a database with about 32’000 Documents, the following line Set DestDoc = srcDoc.CopyToDatabase(DestDB)
produces the following error after copied successfully about 16’000 Documents (free translation from German):
“Error 4005: Document was not saved - Database contains too many field names. … (SourceDatabaseName)”
Can someone explain me:
a.) why the error indicates that the source database has too many field names (nothing added or changed in the source database)
b.) It is possible to acitivate the db option “allow more fields in database”. But in KB is mentioned that some field level searches are not working. Does any one has experience with that option?
Kind regards for help
Subject: Problem with srcDoc.CopyToDatabase(DestDB)
Every Notes database has an internal table called the UNK table. This table contains a list of field names and types. Pre R5 this was limited to 64K. Note this limit is not related to the number of entries but size of entries. Therefore if your database had just one field called XYZ, the size would be a litle more than 3 (one for each character) and not 1.
When you allow for more fields in a database, you will need to do a compact to rebuild the UNK table. This option allows you to ovecome the 64 K limit.
Since field information is now stored differently, field level searches will not work any more.
Before changing this option, it might be a good idea to examine the UNK tables, see if there are any fields that are not used, write an agent to delete these fields (items) from all documents so that there is no refererence to them.
Frequently, many developers just remove the fields from a form, forgetting that documents may contain these items. Therefore references to these fields still exist in the UNK table.
Subject: Problem with srcDoc.CopyToDatabase(DestDB)
Hi,
plz Post more code here!
CU
Thomas Balatka