VPMDataHandler Class Properties

The following table lists the class properties. The properties listed include the standard Visual FoxPro class properties that the VPM Enterprise class uses and the VPM Enterprise custom properties. Where appropriate, the Comments column of the table describes a property and provides suggestions for its use.

 

Property & Initial Value

Comments

Standard Properties Used:

 

Name = “vpmdatahandler”

 

Custom Properties:

 

aBypassFindVariables[1,2]

Loaded by the ExtractFindVariables method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

aBypassGetVariables[1,2]

Loaded by the ExtractGetVariables method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

aBypassRIVariables[1,2]

Loaded by the ExtractRIVariables method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

aCloseViewSourceTables[1,0]

Used by the OpenView and CloseViewSourceTables methods to close a view’s source table(s) when the view cursor is closed.

aCursorAdapterObjects[1,2]

Holds the object references of cursoradapters that have been opened by the OpenCursorAdapter method. CA object references are held in the array until the CA cursor is closed.

aDDDS[1,2]

Contains a row for each record in the Data Sources table. Is loaded by the InitializeProperties method when the data handler object is created.

aEmptyRequiredFields[1,2]

When the EmptyRequiredFields method is run when saving a record, a row is added to this array.for any required fields that are empty or contain a null value.

aRecordLevelInvalidFields[1,3]

When the FieldValidation_RecordLevel method is run when saving a record, a row is added to this array.for any fields that contain an invalid value.

aRelated[1,3]

Used by the Referential Integrity methods to keep track of the related tables, views, and cursoradapters that have been updated.

aUpdateAliases_FKFields[1,0]

When a new record is created in a child cursor the values from the PK fields of the current record in the parent cursor are placed into the FK fields of the new child record. This array along with the array aUpdateAliases_PKFields are used to map the PK fields of the parent to the FK fields of the child in order to facilitate the movement of the field values.

aUpdateAliases_PKFields[1,0]

When a new record is created in a child cursor the values from the PK fields of the current record in the parent cursor are placed into the FK fields of the new child record. This array along with the array aUpdateAliases_FKFields are used to map the PK fields of the parent to the FK fields of the child in order to facilitate the movement of the field values.

cAdditionalConnectionHandles = “”

Causes a SQLCOMMIT or SQLROLLBACK to be issued for specified remote view connection handles when saving or deleting. Normally, the developer creates the comma-delimited list of connection handles in the PreSave, PostSave, PreDelete, or PostDelete code.

cBusinessRulesClass = “prodatahandlerbusinessrules”

Contains the name of the class from which the Business Rules object will be instantiated. If empty, the object will not be created.

cBusinessRulesClass_ClassLibrary = “prodatahandlerbusinessrules”

Contains the name of the class library that contains the class specified in cBusinessRulesClass.

cBypassVariables_LastDDD = “”

Used internally by the BypassVariables method.

cBypassVariables_LastDDTV = “”

Used internally by the BypassVariables method.

cBypassVariables_Max = “”

Set by the BypassVariables_SetProperties method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

cBypassVariables_Min = “”

Set by the BypassVariables_SetProperties method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

cBypassVariables_Wildcard = “”

Set by the BypassVariables_SetProperties method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

cCAID_Alias = “”

After running either the CursorIdentification or CursorAdapterIdentification method for a CA, this property will contain the alias of the CA.

cCAID_DDD_Name = “”

After running either the CursorIdentification or CursorAdapterIdentification method for a CA, this property will contain the name of the database or cursoradapter library that contains the table, view or cursoradapter identified in cCAID_DDTV_Name.

cCAID_DDTV_Name = “”

After running either the CursorIdentification or CursorAdapterIdentification method for a CA, this property will contain the name of the CA or the name of the table, view, or cursoradapter that the CA is mapped to in the DD.

Note: A CA does not have to be in the DD directly, but can be mapped to a table, view, or CA that is in the DD. In this case the Comment property of the CA contains: <DBC or CursorAdapter Library name> ! <Table, View, or CursorAdapter name>

cCursorID_DDD_Name = “”

After running the CursorIdentification method for a cursor, this property will contain the name of the database or CA library that contains the table, view or CA identified in cCursorID_DDTV_Name.

cCursorID_DDTV_Name = “”

After running the CursorIdentification method for a cursor, this property will contain the name of the cursor’s source table, view or CA for DD lookup purposes.

cDDD_DDDS = “”

Contains the GUID that identifies the data source of the view identified in cDDD_V.

cDDD_V = “”

If the SDATADDD data has been moved to a remote database, this property should contain the name of the remote view that should be used to access that data. The name of the view should be entered on the Options/Environment form in VPM. The view name is then stored in the SVPMApplicationDefinition.APD table and passed to the data handler object upon instantiation. Code in the data handler object then puts the view name into this property.

cDDD_VDBC = “”

Contains the name of the database that contains the view identified in cDDD_V.

cDDDS_V = “”

If the SDATADDDS data has been moved to a remote database, this property should contain the name of the remote view that should be used to access that data. The name of the view should be entered on the Options/Environment form in VPM. The view name is then stored in the SVPMApplicationDefinition.APD table and passed to the data handler object upon instantiation. Code in the data handler object then puts the view name into this property.

cDDDS_VDBC = “”

Contains the name of the database that contains the view identified in cDDDS_V.

cDDTV_DDDS = “”

Contains the GUID that identifies the data source of the view identified in cDDTV_V.

cDDTV_V = “”

If the SDATADDTV data has been moved to a remote database, this property should contain the name of the remote view that should be used to access that data. The name of the view should be entered on the Options/Environment form in VPM. The view name is then stored in the SVPMApplicationDefinition.APD table and passed to the data handler object upon instantiation. Code in the data handler object then puts the view name into this property.

cDDTV_VDBC = “”

Contains the name of the database that contains the view identified in cDDTV_V.

cEncryptionCharacter = “S”

Contains the character that is used in the data encryption and decryption routines in the application. The character can be changed through the Options/Environment form in VPM. The character is then stored in the SVPMApplicationDefinition.APD table and passed to the data handler object upon instantiation. Code in the data handler object then puts the character into this property.

cExtractFindVariables_LastDDD = “”

Used by the ExtractFindVariables method.

cExtractFindVariables_LastDDTV = “”

Used by the ExtractFindVariables method.

cExtractGetVariables_LastDDD = “”

Used by the ExtractGetVariables method.

cExtractGetVariables_LastDDTV = “”

Used by the ExtractGetVariables method.

cExtractRIVariables_LastDDD = “”

Used by the ExtractRIVariables method.

cExtractRIVariables_LastDDTV = “”

Used by the ExtractRIVariables method.

cFieldValidationReturnMessage = “”

When writing field validation code, either in the DD or in the business rules class, the message text to be displayed should be placed in this property.

cOrigin = “”

Contains the 20-character string that is placed in Activity, Audit Trail, and Error records to identify the application for which the record was created. By default the application/project prefix is used. The string can be changed through the Options/Environment form in VPM. The string is then stored in the SVPMApplicationDefinition.APD table and passed to the data handler object upon instantiation. Code in the data handler object then puts the string into this property.

cRetrieveFromProperty_CursorDescription = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_PK = “”

Used by the SaveToProperty_PK and RetrieveFromProperty_PK methods, that speed up processing by saving/retrieving the PK values of DDD, DDTV, and DDF records to/from properties rather than retrieving the same information over and over again from the DDD, DDTV, and DDF cursors.

cRetrieveFromProperty_ PostAddCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PostCopyCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PostDeleteCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PostDeletePostTransactionCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PostRestoreCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PostSaveCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PostSavePostTransactionCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreAddCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreCopyCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreDeleteCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreDeletePreTransactionCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreRestoreCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreSaveCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ PreSavePreTransactionCode = “”

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

cRetrieveFromProperty_ RequireFields = “”

Used by the SaveToProperty_RequiredFields and RetrieveFromProperty_RequiredFields methods, that speed up processing by saving/retrieving DDF record information to/from properties rather than retrieving the same information over and over again from the DDF cursor.

cRetrieveFromProperty_ ValidateFields = “”

Used by the SaveToProperty_ValidateFields and RetrieveFromProperty_ValidateFields methods, that speed up processing by saving/retrieving DDF record information to/from properties rather than retrieving the same information over and over again from the DDF cursor.

cRIMessage = “”

Contains information to be displayed in an error message when a save or deletion was not successful.

cTempPath = “”

Contains the Windows Temporary File Directory path.

cUpdateAliases_ SaveParentDDDName = “”

Used by the UpdateAliases_LoadArrays method to speed up the process.

cUpdateAliases_ SaveParentDDTVName = “”

Used by the UpdateAliases_LoadArrays method to speed up the process.

cUpdateAliases_ SaveUpdateAliases = “”

Used by the UpdateAliases_LoadArrays method to speed up the process.

cUpdateAliases_SaveValidAliases = “”

Used by the UpdateAliases_LoadArrays method to speed up the process.

cUserID = “”

Contains the ID of the current user. The User ID is passed to the data handler object upon instantiation. Code in the data handler object then puts the User ID into this property. The User ID in this property is placed in Activity, Audit Trail, and Error records to identify the user for which the record was created.

dBypassVariables_Max = “”

Used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

dBypassVariables_Min = “”

Used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

DefaulValues_cDDDName = “”

Used by the DefaultValues method. Can be used by developer default value code in the DD to identify the field for which the default value is being produced.

DefaulValues_cDDFName = “”

Used by the DefaultValues method. Can be used by developer default value code in the DD to identify the field for which the default value is being produced.

DefaulValues_cDDFPK = “”

Used by the DefaultValues method. Can be used by developer default value code in the DD to identify the field for which the default value is being produced.

DefaulValues_cDDTVName = “”

Used by the DefaultValues method. Can be used by developer default value code in the DD to identify the field for which the default value is being produced.

FieldValidationReturnValue = .F.

When writing field validation code, either in the DD or in the business rules class, if the value to be returned should be a value other than .T., the value to be returned should be placed in this property.

GetDDTV_cFK_DDD = “”

Used by the GetDDTV method to determine if the object whose reference is stored in the oDDTVRecord property is the object that has been requested. If so, there is no need to retrieve the record again.

GetDDTV_cName = “”

See the comments for the GetDDTV_cFK_DDD property.

GetDDTV_cPK = “”

See the comments for the GetDDTV_cFK_DDD property.

lAuditTrail = .T.

The application-level Audit Trail setting (whether on (.T.) or off (.F.)) is passed to the data handler object upon instantiation. Code in the data handler object then puts that logical value into this property. That value then causes the Audit Trail functionality in the data handler object’s save and delete functions to be enabled or disabled.

lCloseViewSourceTables = .F.

Used by the OpenView and CloseViewSourceTables methods to close a view’s source table(s) when the view cursor is closed.

lDoNotRecycleDeletedRecs = .F.

Application-level setting which prevents deleted records from being reused when a record is added to a table.

lErrorsTableNearingSizeLimit = .F.

Set to .T. by the CreateErrorRecord method to signify to the AdminTool_ErrorHandling method of the application object that a message should be displayed that warns the user that the Errors table is nearing the VFP file size maximum of two gigabytes.

lIsNew_Recycled = .F.

When the IsNew method is run to determine if a record is new (was created but not yet saved), this property is set to .T. if the new record was created by recycling (RECALLing) a deleted record.

Note: Recycling of deleted records only occurs in tables, not in views and cursoradapters.

lValidOverrideOK = .F.

When writing field validation code, either in the DD or in the business rules class, if a value of 0 (zero) or .F. is to be returned and the override functionality should be disabled, the value in this property should be set to .F.. This setting overrides the field-level override setting.

nBypassFindVariables = 0

Set by the ExtractFindVariables method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

nBypassGetVariables = 0

Set by the ExtractGetVariables method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

nBypassRIVariables = 0

Set by the ExtractRIVariables method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

nBypassVariables_Max = “”

Set by the BypassVariables_SetProperties method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

nBypassVariables_Min = “”

Set by the BypassVariables_SetProperties method and used by the OpenView, OpenCursorAdapter, RequeryView, and RefreshCursorAdapter methods.

nCalledFrom = 0

Set in the IdentifyCallingApplication method to identify whether or not the data handler object was instantiated from within VPM or a VPM application. If 1, the data handler object was instantiated from within VPM or a VPM application. If 2, the data handler object was instantiated from somewhere other than VPM or a VPM application.

nCloseViewSourceTables = 0

Used by the OpenView and CloseViewSourceTables methods to close a view’s source table(s) when the view cursor is closed.

nContinueRec = 0

If the LocateFor method performs a CONTINUE that is successful, this property will contain the record number of the record that was found. Otherwise, this property will contain zero.

nCursorID_SourceType = 0

After running the CursorIdentification method for a cursor, this property will contain a number identifying the source of the cursor’s data (1 = local view, 2 = remote view, 3 = table, 4 = CA).

nRelated = 0

Used by the Referential Integrity methods to keep track of the related tables, views, and cursoradapters that have been updated.

nRetrieveFromProperty_ RecycleRecs = 0

Used by the SaveToProperty_DDTV and RetrieveFromProperty_DDTV methods, that speed up processing by saving/retrieving DDTV record information to/from properties rather than retrieving the same information over and over again from the DDTV cursor.

oBusinessRules = .F.

Contains the object reference of the Business Rules object.

oCallingObject = .F.

The object reference of the object that instantiated the data handler object is passed to the data handler object and stored in this property. That allows for the calling of methods and referencing of properties of that calling object.

oDDDRecord = .F.

The GetDDD method retrieves into an object the SDATADDD record (using the SCATTER NAME command) for the database or cursoradapter library specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

oDDFHRecord = .F.

The GetDDFH method retrieves into an object the SDATADDFH record (using the SCATTER NAME command) for the table, view, or cursoradapter field specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

oDDFPRecord = .F.

The GetDDFP method retrieves into an object the SVPMDDFP record (using the SCATTER NAME command) for the table, view, or cursoradapter field specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

oDDFRecord = .F.

The GetDDF method retrieves into an object the SDATADDF record (using the SCATTER NAME command) for the table, view, or cursoradapter field specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

oDDGKRecord = .F.

The GetDDGK method retrieves into an object the SDATADDGK record (using the SCATTER NAME command) for the table, view, or cursoradapter field specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

oDDITRecord = .F.

The GetDDIT method retrieves into an object the SDATADDIT record (using the SCATTER NAME command) for the table, view, or cursoradapter tag specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

oDDTVRecord = .F.

The GetDDTV method retrieves into an object the SDATADDTV record (using the SCATTER NAME command) for the table, view, or cursoradapter specified in the parameters passed to the method. The object reference of the object is stored in this property so that its fields can be referenced.

 

More:

VPMDataHandler Class Methods