Advantage Client Engine
Retrieve a property of a subscription from the data dictionary.
UNSIGNED32 ENTRYPOINT AdsDDGetSubscriptionProperty( ADSHANDLE hDictionary,
UNSIGNED8 *pucSubscriptionName,
UNSIGNED16 usPropertyID,
VOID *pvProperty,
UNSIGNED16 *pusPropertyLen );
hDictionary (I) |
A data dictionary connection. |
pucSubscriptionName (I) |
The name of a subscription in the database. |
usPropertyID (I) |
Index of the 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, specifies the size of the buffer pointed to by pvProperty. On output, returns the length of the property copied into the buffer. |
AE_INVALID_PROPERTY_ID |
Either the value supplied in usPropertyID is not a valid article property, or the specified property cannot be retrieved. |
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. |
This function retrieves a property of the specified subscription 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 |
The comment for the subscription. |
ADS_DD_SUBSCR_PUBLICATION_NAME |
The function returns the name of the publication this subscription is using. The name is returned as a NULL terminated string in pvProperty. |
ADS_DD_SUBSCR_TARGET |
The function returns the target database this subscription is replicating to. The path is returned as a NULL terminated string in pvProperty. |
ADS_DD_SUBSCR_USERNAME |
The function returns the user name for the target database. The name is returned as a NULL terminated string in pvProperty. |
ADS_DD_SUBSCR_FORWARD |
The function returns the flag that specifies whether or not replication updates are forwarded. It is returned as a 2-byte integer in the buffer pointed to by pvProperty. *pusPropertyLen must be 2 on input. |
ADS_DD_SUBSCR_ENABLED |
The function returns the flag that specifies whether or not this subscription is enabled. It is returned as a 2-byte integer in the buffer pointed to by pvProperty. *pusPropertyLen must be 2 on input. |
ADS_DD_SUBSCR_QUEUE_NAME |
The function returns the replication queue that stores pending replication updates. The name is returned as a NULL terminated string in pvProperty. |
ADS_DD_SUBSCR_OPTIONS |
The function returns a bit field of the options for the specified subscription. This property is returned as a 4-byte integer in the buffer pointed to by pvProperty. *pusPropertyLen must be 4 on input when calling this function with this property. The options are OR’ed together into the bit field. See AdsDDCreateSubscription for additional information on the subscription options. |
ADS_DD_USER_DEFINED_PROP |
The function returns the user defined subscription property in pvProperty. The user defined property is set, read, and interpreted by the application. It is not used by Advantage. |
ADS_DD_SUBSCR_PAUSED |
The function returns the flag that specifies whether or not this subscription is paused. It is returned as a 2-byte integer in the buffer pointed to by pvProperty. *pusPropertyLen must be 2 on input. |
// retrieve the target database for a subscription
usLen = sizeof( aucBuf );
ulRetVal = AdsDDGetSubscriptionProperty( hConn, "mysub",
ADS_DD_SUBSCR_TARGET, aucBuf, &usLen );
See Also