f2s_connection_user_password¶
Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers
Syntax¶
**There is no set_attribute.  This attribute is read only.**
get_attribute f2s_connection_user_password of {DriverID} {server} to {variable}
Parameter  | 
Description  | 
|---|---|
DriverID  | 
The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID.  | 
server  | 
string pointer of the name of the database server  | 
variable  | 
String variable to hold the user password  | 
Description¶
This read only attribute is used to get the password of the user currently logged into the server. If using a MSSQL server with a trusted connection, this attribute will return blank.
Examples¶
get_attribute
String sName sPass sServer
Boolean bNT
Get_Attribute f2s_server of _f2s_ActiveDriverId to sServer
Get_Attribute f2s_connection_user of _f2s_ActiveDriverId (f2s_ConstPointer(sServer)) to sName
If (sName="") begin
   Get Network_User_Name to sName
   Move True to bNT
End
Else Get_Attribute f2s_connection_user_password of _f2s_ActiveDriverID (f2s_ConstPointer(sServer)) to sPass
If (bNT) Showln (SFormat("On server %1, using NT authentication, the user is %2.",sServer, sName))
Else Showln (SFormat("On server %1, the current user is  %2 using password %3.", sServer, sName,sPass))