E9.2 Add user in JDE E1 using API

thivagar

Member
Hi
I am new to JDE E1. I have a requirement to create and update user using APIs. Can you guys suggest to me which is the best and preferred way to add and update user?
 

johnd

Active Member
Hi

What are you trying to do exactly? Update E1 table F0092 or sign on with a user id & password?

If you mean sign on, then this
if (JDB_InitEnvOvr( &hEnv, lpDS->szEnvironment, lpDS->szUserId, lpDS->szPassword) != JDEDB_PASSED)
{
JDB_FreeBhvr(hUser);
return (ER_ERROR);
}

if (JDB_InitUser(hEnv, &hUser2, szEnvironmentName, JDEDB_COMMIT_AUTO) != JDEDB_PASSED)
{
JDB_FreeBhvr(hUser);
return (ER_ERROR);
}
 

johnd

Active Member
JDB_InitEnvOvr()

Last Modified: ERP9.0 | June 06, 2001


JDB_InitEnvOvr() initializes a JDB environment, usually on the servers. This API passes the environment name, user name, and password for signing on to the environment. In addition, without an initialized environment, no JDB API will work. The environment handle initialized here is needed for the call to JDB_InitUser.

Parameters

ParameterI/ONotesUsage
hEnvInputThe primary environment
szUserNameInputThe user name to sign on this environment
szPasswordInputThe password of the user
Syntax

JDEDB_RESULT JDB_InitEnvOvr(HENV hEnv, JCHAR*szEnv, JCHAR*szUserName, JCHAR*szPassword)
Return Value

Return ValueDescription
JDEDB_PASSEDReturn value if this succeeds
JDEDB_FAILEDReturn value if this fails
Example

HENV hEnv = NULL;
JDEDB_RESULT rcode;
rcode = JDB_initEnvOvr(&hEnv, _J("ADEVCLA"), _J("AB1234567"), _J("AB1234567_PSD"();
 
Top