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.

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
File Created: 2000:01:25:15:59:22
Last Updated: 2000:01:25:15:59:22