ERROR: Memory allocation request exceeded 65,000 bytes

I have an agent that copies the comments field from db A to db B. This is the formula I’m using:

Key:=NameFirstContact+NameLastContact;

FIELD PreviousComments:=@DbLookup( “”:“”;“0725710E:0076C89B” ;“Comments Redo”; Key;“CommentList”);

SELECT @All

When I run the agent, it gives me this error: ERROR: Memory allocation request exceeded 65,000 bytes

Some of the comments I’m trying to copy over are only one or two lines, but I get the error.

I can manually copy and paste the comments from db A to B without any problem.

I tried changing the comments field on both db A and B to text, then Rich Text, but still getting the error.

Is there a work around for this? I have over 1500 docs, and manual copy and paste is not an option.

I read some posts related to this error on this forum, but none of them applied to my situation.

Any insight on how to resolve this will be much appreciated.

Thanks in advance.

Helen

Subject: ERROR: Memory allocation request exceeded 65,000 bytes

@DbLookup has a limit of 64k and returns all documents that match the key. If for example one of the names you are doing the lookup on has 50 documents then that limit will be exceeded if all the CommentList fields combined exceed this.

Can you expand on what you are trying to achieve.

Subject: RE: ERROR: Memory allocation request exceeded 65,000 bytes

Thank you for your response.I had originally exported the comments field out of db A to excel and imported them into db B. The db was put in production, and users had made edits and modifications to documents. Few weeks after it was being used, we discovered that the comments that I imported into db B. did not completely import. It had only imported the first 2 lines. I could not do a simple delete all docs and redo of the import as the docs had been modified and new docs created

What I am trying to accomplish now with the agent is to take the comments out of db A and populate it in db B in the corresponding document.

Your explanation above makes sense about the @DbLookup and 64, however, I tried running the agent with a copy of the db that had only one document whose comments field was one line, and it still gave me the same error.

Do you know of a work around for this?

Thanks again

Helen

Subject: RE: ERROR: Memory allocation request exceeded 65,000 bytes

As you only have one document in the database that you are looking up to then I have no idea why you are receiving this error.

I would run some tests trying to look up other fields in the document to see if it is just this field that is causing the problem or whether it is a general problem with the @dblookup.

Also if your original code were working it would populate the PreviousComments field of your documents in dbB with CommentList fields of all matching documents in dbA. Is this what you want or should there be a one to one relationship with the documents?