SqlSetLPwd%

Sets the user's SQL Server password in the SQL Server login record.

Syntax

SqlSetLPwd% ( loginrec%, pwd$ )

where

loginrec% ( )
Is a login record. The value of loginrec% is returned by SqlLogin%.
pwd$
Is the SQL Server password sent to SQL Server. The string can have as many as 30 characters.

Returns

SUCCEED (1) or FAIL (0).

Remarks

For SqlSetLPwd% to have any effect, it must be called before SqlOpen%. SqlSetLPwd% is required only if the user has a SQL Server password. If SqlSetLPwd% is not called, the password is set to an empty string.

The SQL Server passwords are defined in the syslogins table in the master database. Only the system administrator has permission to look at passwords.

See Also

SqlLogin%, SqlOpen%, SqlSetLApp%, SqlSetLHost%, SqlSetLUser%