PICampaignSearch Method (PICampaignDB)

                

 

This method searches the PICampaignDB for matching PICampaign objects. The method returns a PICampaignList collection of results.

 

Syntax

object. PICampaignSearch varSearchStart, varSearchEnd, bstrCampaignIDMask, [pAsynchStatus], [varCampaignUniqueID]

The PICampaignSearch method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PICampaignDB object.

varSearchStart

A VARIANT containing the search start time. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation. NOTE:  The minimum start time passed should be PITime.UTCSeconds = 1. 

varSearchEnd

A VARIANT containing the search end time. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation.

bstrCampaignIDMask

A string containing a CampaignID mask to match.

pAsynchStatus

A PIAsynchStatus object used to place an asynchronous call and to cancel long running queries. [Optional]

varCampaignUniqueID

A Variant containing the unique ID of a particular PICampaign. Specifying this argument causes the search mask to be ignored.

 

Remarks

Returns a PICampaignList of matching PICampaign objects. The PICampaign primary index is time; specifying small ranges of time will result in fastest performance.

 

Any PICampaign which has an EndTime on or after the search start and a start time on or before search end matches the search time criteria. Running PICampaign's (PICampaign's with no end time set) always match search times which include current time.

 

The bstrCampaignIDMask mask defaults to the wildcard character "*". Therefore just specifying search start and end returns all PICampaign objects over that time range.

 

The pAsynchStatus argument is used for performing asynchronous calls. If this argument is passed, the method returns immediately with an empty list. This list is protected against access (an error of pseASYNCHMODEERR will be returned) until the call is complete.

 

The argument varPICampaignUniqueID is used to retrieve a specific PICampaign object. This argument, if set, overrides the search mask as well as the start and end time. The search start and end time are used as a hint for where to find the object, but it is possible that the matching object may have start and/or end times outside of the time range of the search.

 

If no PICampaign's are found that match the search criteria, an empty list is returned.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseNOGENSERVER

The underlying server abstraction layer could not be accessed.

Enabling Operational Intelligence