WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Context

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

NDS Context Unknown

Keywords:      NDS context

Question:

I'm using the n4ObjectList function to read groups in a NDS Context. Unfortunately, when the context does not exist, I get a WinBatch error and the script stops. How do I get around this?

Also, what is the context?

Answer:

You can *carefully* turn error mode off directly around the n4ObjectList function, and then test for the error with the Lasterror function. If Lasterror returns a null, then it worked, but if Lasterror is not null, then you could put up a message box and ask them to type in another context.

For example:

errormode(@off)
objects = n4ObjectList("", "Group", "", "")
errormode(@cancel)
if lasterror !="" then Message("Error", "You specified an invalid context.  Try again...")
> Also, what is the context?

In "richard.windowware", the context is "windowware".

In "richard.support.windowware", the context is "support.windowware".


Article ID:   W13627
Filename:   NDS Context Information.txt
File Created: 1999:11:09:12:19:06
Last Updated: 1999:11:09:12:19:06