AdsDDGetDatabaseProperty

Advantage Client Engine

Retrieves one database property from the data dictionary into the supplied buffer.

Syntax

UNSIGNED32 AdsDDGetDatabaseProperty( ADSHANDLE hDBConn,

UNSIGNED16 usPropertyID,

VOID *pvProperty,

UNSIGNED16 *pusPropertyLen );

Parameters

hDBConn (I)

Handle of database connection.

usPropertyID (I)

Index of a database property to retrieve. See Remarks for allowed values.

pvProperty (O)

Pointer to the buffer where the property is to be copied into.

*pusPropertyLen (I/O)

On input, it specifies the size of the buffer pointed to by pvProperty. On output, it returns the length of property stored in the buffer.

Special Return Codes

AE_INVALID_PROPERTY_ID

Either the value supplied in usPropertyID is not a valid database property, or the specified property is not retrievable.

AE_INSUFFICIENT_BUFFER

The size of the property to be copied into pvProperty is larger than the buffer size specified by *pusPropertyLen. The required buffer length is returned in *pusPropertyLen when this error occurs.

AE_PROPERTY_NOT_SET

The requested property is not set in the data dictionary. No data is returned in pvProperty and *pusPropertylen.

Remarks

AdsDDGetDatabaseProperty retrieves one database property from the data dictionary. The following are the valid values of usPropertyID and the expected return value in pvProperty and *pusPropertyLen.

usPropertyID

Description

ADS_DD_COMMENT

Returns the database description in pvProperty.

ADS_DD_VERSION_MAJOR

Returns the user major version property. On input, the *pusPropertyLength should be equal to or greater than 2. See AdsDDSetDatabaseProperty for more info.

ADS_DD_VERSION_MINOR

Returns the user minor version property. On input, the *pusPropertyLength should be equal to or greater than 2. See AdsDDSetDatabaseProperty for more info.

ADS_DD_USER_DEFINED_PROP

Returns the user defined database property.

ADS_DD_DEFAULT_TABLE_PATH

Returns in the pvProperty the default path for creating new tables. The path is a fully qualified UNC path. If this property is not set, the default table path is the same directory as the data dictionary.

ADS_DD_TEMP_TABLE_PATH

Returns in the pvProperty the default path for creating temporary tables. The path is a fully qualified UNC path. If this property is not set, the default temporary table path is the same as the default table path.

ADS_DD_LOG_IN_REQUIRED

Returns in the pvProperty a 2-byte (UNSIGNED16) integer that indicates whether anonymous user connection is allowed to the database. The returned value is zero if anonymous user is allowed to make connection to the database. Otherwise the database does not allow an anonymous connection. See AdsConnect60 for more information. This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

ADS_DD_VERIFY_ACCESS_RIGHTS

Returns in the pvProperty a 2-byte (UNSIGNED16) integer that indicates whether the Advantage Database Server enforces the user’s access rights when opening a database table or view or executing a stored procedure. The returned value is zero if the Advantage Database Server does not enforce the user access rights. A non-zero value is returned if the Advantage Database Server enforces the user access rights. See AdsConnect60 and AdsOpenTable for more information. This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

ADS_DD_ENCRYPT_TABLE_PASSWORD

Returns in pvProperty the table encryption password that is used to encrypt all encrypted tables in the data dictionary. This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

ADS_DD_ENCRYPT_NEW_TABLE

Returns in pvProperty a 2-byte (UNSIGNED16) integer that indicates whether the table will be automatically encrypted when being added or created in the data dictionary. This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

ADS_DD_FTS_DELIMITERS

Returns in pvProperty the Full Text Search (FTS) delimiter characters for the data dictionary.

ADS_DD_FTS_NOISE

Returns in pvProperty the default Full Text Search (FTS) noise words for the data dictionary.

ADS_DD_FTS_DROP_CHARS

Returns in pvProperty the default Full Text Search (FTS) drop characters for the data dictionary.

ADS_DD_FTS_CONDITIONAL_CHARS

Returns in pvProperty the default Full Text Search (FTS) conditional drop characters for the data dictionary.

ADS_DD_ENCRYPTED

This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

ADS_DD_LOGINS_DISABLED

Returns in pvProperty a 2-btye (UNSIGNED16) integer that indicates if the database is currently allowing logins. See Disabling Database Logins for more details.

ADS_DD_LOGINS_DISABLED_ERRSTR

Returns in pvProperty a string that is currently being used when denying database logins (if the ADS_DD_LOGINS_DISABLED property is TRUE).

ADS_DD_ENCRYPTED

Returns in the pvProperty parameter a 2-byte (UNSIGNED16) integer that indicates if the data dictionary itself (.add file) is encrypted. If the returned value is zero the data dictionary is not encrypted. If the returned value is one the data dictionary is encrypted. Only the ADSSYS user and users authorized to modify the database are allowed to retrieve this property.

ADS_DD_ENCRYPT_INDEXES

Returns in pvProperty a 2-byte (UNSIGNED16) integer that indicates whether indexes on encrypted tables will be encrypted. This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

ADS_DD_ENCRYPT_COMMUNICATION

Returns in pvProperty a 2-byte (UNSIGNED16) integer that indicates whether all communication between the Advantage Database Server and client programs will be encrypted. This property can only be retrieved by users with administrative permissions. See Advantage Data Dictionary User Permissions for more information.

Example

After making a connection to the database, retrieve the description of the database.

AdsConnect60( "n:\\MyData\\myData.ADD", ADS_REMOTE_SERVER, "ADSSYS", NULL, ADS_DEFAULT, &hDD );

usBufferSize = sizeof( aucMessage );

AdsDDGetDatabaseProperty( hDD, ADS_DD_COMMENT, aucMessage, &usBuffSize ) ;

AdsDisconnect( hDD );

See Also

AdsDDCreate

AdsDDSetDatabaseProperty

AdsConnect60

AdsDDCreateUser

AdsDDDeleteUser

AdsDDCreateUserGroup

AdsDDDeleteUserGroup

AdsDDAddUserToGroup

AdsDDRemoveUserFromGroup

AdsDDGrantPermission

AdsDDRevokePermission

system.dictionary