Subject: NSFDbCreateAndCopy - Attempt to create duplicate template
maybe your Db has templatename set, so the copy will also pose as template with the same name.
I’m not sure that server should disallow this as manually you can copy a DB without any problems template name or no tempalte name, but it could be some sort of protection.
Subject: Re: NSFDbCreateAndCopy - Attempt to create duplicate template
There’s new code in the Domino 6 server to prevent duplicate templates from occurring on the server. It’s to prevent things such as a user deciding that their customized mail database design IS the design template instead of inheriting from a design template
I haven’t had the need to do what you’re doing yet, but try changing the NOTE_CLASS_ALL flag to NOTE_CLASS_ALL_NONDATA and see if it helps.
Is your code a standalone app or a server add-in task?