AdsStmtEnableEncryption

Advantage Client Engine

Encrypts the cursor generated after executing the SQL statement.

Syntax

UNSIGNED32

AdsStmtEnableEncryption( ADSHANDLE hStatement,

UNSIGNED8 *pucPassword );

Parameters

hStatement(I)

Handle of an SQL statement created by a call to AdsCreateSQLStatement.

pucPassword(I)

Case-sensitive text encryption password.

Remarks

Enabling encryption on the statement handle ensures that the data travels across the network in encrypted format. When encryption is enabled for the statement handle, the cursor generated is encrypted on the server with the specified encryption password. The encrypted data is automatically decrypted by the client.

This API provides additional security for your data. When you use encrypted tables in SQL statements, you must use AdsStmtSetTablePassword to provide the encryption passwords for the base tables. This allows the server to read the data in those tables. If the SQL statements result in static cursors (e.g., a join), then the resulting rowset is, by default, not encrypted. This means that the data will be transmitted to the client in the clear. If this is not desirable, you can use the AdsStmtEnableEncryption API. This ensures that all cursors are encrypted on the server. If your SELECT statements result only in live cursors, then the cursor will now be a static cursor and a temporary table (cursor) is created by the server.

This function affects cursors created in the subsequent query executing on the specified statement handle.

Note The encrypted cursor is always read-only. See AdsStmtSetTablePassword for information about creating an updatable cursor with encrypted data.

Example

Click Here

See Also

AdsStmtDisableEncryption

AdsStmtSetTablePassword

AdsStmtClearTablePasswords