SetSecureConnectionString

Description

Specifies the encrypted string to be used during the database connection. The encrypted string is generated via the "Secure Connection Encryptor" tool.

This function takes effect only when the application is deployed via the Application project and the PowerClient project (it returns -1 when the application is deployed via the PowerServer project).

Applies to

Transaction objects

Syntax

transaction.setsecureconnectionstring ( string strconnect ) 

Argument

Description

transaction

The name of a connected transaction object.

strconnect

A string indicating the encrypted connection string.

The encrypted connection string is generated via the "Secure Connection Encryptor" tool.


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is null, the method returns null.

Examples

The following example specifies the encrypted string to be used for database connection:

sqlca.EnableSecureConnection (true)
sqlca.SetSecureConnectionString("xqRAXnVg6rXmXbnDh0KDONUBU1rnnrjoD91RyPElnxrf0l9SnSlfpVvBhjVILLH9+mvvHhYexk0niM+N17rdZQLFCEW0x7z89qnNpVpIDgbhKHB7tvPyM2CaoFc6gsdvifEmUh0ICExJAyfzAA+GcA==")
sqlca.SetSecureConnectionProperty("logid", "appeon")
sqlca.AutoCommit = false
connect;

See also

EnableSecureConnection

SetSecureConnectionProperty

GetSecureConnectionString