Login_VerifyInfo()

Examples


The Login_VerifyInfo() function verifies whether the specified user ID and password are a valid combination for access to the named data source.

Syntax

Login_VerifyInfo(data_source, user_ID, password)

Parameters

data_source – A string specifying the data source to verify access for.

user_ID – A string specifying the user ID for which access to the data source should be verified.

password – A string specifying the password associated with the user ID to be verified.

Return value

An integer corresponding to one of the following constants:

[spacer]

Constant

Description

STATUS_SUCCESS

The login was successful.

STATUS_ERROR

An unknown error occurred.

STATUS_LOGIN_FAILED

The login information was invalid.

STATUS_TOO_MANY_CONNECTIONS

The maximum number of connections to the database was reached.

STATUS_DATASOURCE_REJ

The server acknowledged the connection attempt, but rejected it. The problem was server-based.

STATUS_UNABLE_TO_CONNECT

The client computer’s ODBC drivers were unable to establish a connection to the server. The problem was client-based.


Comments

This function is intended to simplify the process of switching a user’s login from one data source to another. Using this function, you can verify whether the specified user is able to log into another data source before logging the user out of the data source he or she is currently connected to. If you’re developing an application that integrates with Microsoft Dynamics GP, this function will be useful when switching users between companies, where the information for each company is stored in different data sources.


Documentation Feedback