Chapter 5 C Routines Reference
Retrieve the user name for the client connection that is associated with a C or C++ component instance.
JagStatus JAG_PUBLIC JagGetUserName( SQLPOINTER userName, SQLINTEGER userNameLen, SQLINTEGER *returnLen)
userName
The address of a character array to receive the user name. The user name can have 0 length if no user name was supplied. In this case, only a null-terminator will be written to *userName. (In practice, a user name is required to connect to the server unless user authentication is disabled.)
userNameLen
The length, in bytes, of the userName array. The length must include space for a null-terminator.
returnLen
NULL or the address of a SQLINTEGER variable.
returnLen is an optional output parameter that receives the length in bytes of the userName value. The user name is null-terminated and the length includes the null-terminator.
Return value | To indicate |
---|---|
JAG_SUCCEED | Success. |
JAG_FAIL | Failure. |
JagGetUserName fails for the following reasons:
Check the server's log file for more information when JagGetUserName fails.
JagGetHostName, JagGetPassword
Copyright © 2001 Sybase, Inc. All rights reserved. |
![]() |