Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Error: Index is not to be generated in server.

I have a form that searches a date range. In my code before I search again I use this:(see below) to remove the content of the folder. Is there another way to do this.

Dim vc As notesviewentrycollection
Set view=db.Getview("Date Range Report")
Set vc=view.AllEntries
Call vc.RemoveAllFromFolder("Date Range Report")
0
cyle
Asked:
cyle
  • 3
  • 3
  • 2
1 Solution
 
cyleAuthor Commented:
Using Notes and the error I got was my Title.
0
 
mshogrenCommented:
Hi,

This occurs when you are working with a private folder.  Is it possible to chnage this folder so it is not a private folder?
0
 
cyleAuthor Commented:
It is Shared, private on first use. If I dont change, how can I delete result in folder? Or I do change ---- to what?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mshogrenCommented:
If the folder is changed to Shared then your code should work.  I am still thinking of other alternatives.  Could you tell me how the variable db is defined in your code.
0
 
cyleAuthor Commented:
Set db = session.CurrentDatabase
0
 
mshogrenCommented:
How is the code called.  Is it in an agent? Is it called via the web?  I am not sure if that information is going to help but I am still thinking about this one.

Please let me know if changing the folder to be Shared works.
0
 
marilyngCommented:
cycle, if your folder is shared, private on first use, then the folder must exist before you call your code.  Which means the first time you attempt to call your code, it tries to create the folder, and it fails.

Normally, you have to jump through a couple of hoops and create the private folder first, then you can write to it.  So, in your script, when you first open it, you first need to check to see if the folder is there.  Another thing I have done is to check for the folder when I open the database.  Or, my clever workaround:

Instantiate an EMPTY collection:

set coll = thisotherview.getalldocumentsbyKey("zzzzz",true)
call coll.putallinfolder(thisPrivateFolder, true) <<True I think will create the folder if it doesn't exist. - solly, not at a notes computer to check.

More workarounds:
http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21094072
0
 
marilyngCommented:
Oops, hit enter too soon.  Then if the folder does exist,you need to check to see if it contains documents, else that will throw an error, too. If it does, then remove documents. Else, do the rest of your code.  No sense in taking up processing time unless there are documents to remove.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now