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

NetwareX Extender

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

nwSearchFilter Error 239


Question:

In my application I use a nwSearchFilter construct in a function. Works fine when I switch context, but only in debug mode. when compiled i get an error:
nwSearchFilter(curr_context,'BASECLS','',0,0,0)
error 239: error creating context.

in wwwbatch.ini:
[NetWare Extender]
LastError=FFFFFECB "NWDSDuplicateContextHandle() : WWNWX_ObtainContextHandle()"
This code does not work when compiled. when choosing the second context, an error occurs.
AddExtender('WWNWX34I.DLL')
rtv = nwLogin('\\IV-TREE', '.CN=projectverkenner.OU=User-Extern.OU=PA.O=Iv', 'shudokan')

contexts = '\\IV_TREE|\\IV-TREE'
context = ItemSelect('',contexts,'|')

nwSetContext(0,'',context)

nwSearchFilter(context,'BASECLS','',0,0,0)
nwSearchFilter(context,'ANAME','User',0,0,0)
nwSearchFilter(context,'AND','',0,0,0)
nwSearchFilter(context,'ANAME','generational qualifier',0,0,0)
nwSearchFilter(context,'EQ','',0,0,0)
nwSearchFilter(context,'AVAL','WN01502',0,0,0)
nwSearchFilter(context,'END','',0,0,0)
accountobjects = nwSearchObjects(StrCat(context,'\.','[Root]'),'','',2,'')
nwSearchFilter(context,'*FREE_BUFFER*','',0,0,0)

Message('',accountobjects)

nwLogout('\\IV-TREE',0)
Exit
What is the meaning ?

Answer:

OK, in regards to the diagnostic information posted at the start of this thread, here's the error code information:
ERR_EXPECTED_IDENTIFIER -309 0xFFFFFECB
I don't recall ever having encountered that error previously. It is one of the ones returned by the NDS client portion of the Novell Client, rather than being an error returned by an NDS/eDir server to a client in response to a client's request for services. Typically, it means that something has gone wrong w/respect to the parameters being passed to a Novell Client function and the function has returned the error as a result of a parameter validation failure.

Now, on to your code....

Are you really dealing with 2 separate trees? It looks like the only difference between them is a dash "-" and an underscore "_". I just wanted to confirm that you really are using 2 separate trees [albeit with very similar names] and that there's no problems with your name resolution configuration that could result in getting the names & their corresponding network addresses confused.

Your call to nwSetContext() is only setting the tree name in the local context for the script. Since you're not specifying a context value at the same time, nwSetContext() may possibly have to obtain the default global contex for that tree in order to set a value in the local context handle for the script. I suspect that something in your global Novell Client configuration environment is causing a problem here.

As a test, please provide a context value in addition to a tree value when calling nwSetContext(). For example, try passing in "[Root]" as the context as follows:

nwSetContext(0,'[Root]',context)

Please note that the variable "context" really contains a tree name, not a context value.

Give this a try and let me know what happens.


Article ID:   W17082
File Created: 2007:07:03:14:28:12
Last Updated: 2007:07:03:14:28:12