Topic
  • 1 reply
  • Latest Post - ‏2013-01-24T12:44:56Z by pdubovitsky
SystemAdmin
SystemAdmin
24948 Posts

Pinned topic Strange Error by using ValidateUserCredentials

‏2013-01-24T08:07:11Z |
Hello

Actually I want to create a log-in-routine from a doors-dxl-script which requires a clear quest query resp. its results. The dxl-scripts are more difficult than a vba-script an so I think to use a vba script.

First the standard-Logon:


Set objCqSession = CreateObject(
"CLEARQUEST.SESSION") Set objWorkspace = CreateObject(
"CLEARQUEST.WORKSPACE")   Call objCqSession.UserLogon(
"loginName", 
"password", 
"database", 2, 
"")


In order to handle a password-dialog (userename and password may be incorrect) I thougt to use "ValidateUserCredentials".


Set objCqSession = CreateObject(
"CLEARQUEST.SESSION") Set objWorkspace = CreateObject(
"CLEARQUEST.WORKSPACE")   string sValidatedUser = objCqSession.ValidateUserCredentials(
"loginName", 
"password")


But this code produces an error "13043 The session must be initialized before any operations possible." Using the help of aunt google I only can find the following error description - but this does not make any sense.

Can you help me?

Thanks for any tips
Best regards
Wolfgang
  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: Strange Error by using ValidateUserCredentials

    ‏2013-01-24T12:44:56Z  
    Hello,

    You need to use UserLogon and catch error thrown (On Error...).

    ValidateUserCredentials is different. It allows you to validate user that is not necessarily ClearQuest user.
    For instance, you can have LDAP authentication configured and validate provided credentials before creating ClearQuest user account.

    Pavel