Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


n4login error 222

Keywords:    n4login error 222 invalid username context n4SetContext

Question:

I am attempting an n4Login and specifying a context and tree. However I get the error '222: Invalid user name or context'. Any Ideas?

Answer:

You will probably need to use n4SetContext to specify a new context to log into.

n4SetContext("Org","Trees")
n4Login("CN=autonc", "ncpass", "O=org", "Trees")
n4Attach("\\birch")
n4Map("\\birch\SYS\data\apps\nc_data", "m:")

n4SetContext("Org","Tree00")
n4Login("CN=autonc", "ncpass", "O=org", "Tree00")
n4Attach("\\spruce")
n4Map("\\spruce\sys\data\nc_data", "n:")

n4MapDelete("n:")
n4SetContext("Org","Tree00")
n4Detach("\\spruce")
n4LogoutTree("CN=org", "tree00")

n4MapDelete("m:")
n4SetContext("Org","Trees")
n4Detach("\\birch")
n4LogoutTree("CN=org", "trees")

exit

Article ID:   W14387
Filename:   n4login error 222.txt