|
Topic
|
Description
|
|
lUpdateAliases_Add
property
|
There is a new
form property, lUpdateAliases_Add, that when .T. (the default)
and the New button is clicked, causes a record to be added to
the aliases listed in the cUpdateAliases property.
|
|
lUpdateAliases_Copy
property
|
There is a new
form property, lUpdateAliases_Copy, that when .T. (the default)
and the Copy button is clicked, causes the current record to be
copied in the aliases listed in the cUpdateAliases property.
|
|
New property to
bring up application full screen
|
There is a new
property of the application object, lFullScreen, that when .T.
(the default) causes the application to come up full screen.
|
|
New property
determines if Introductory form is run
|
There is a new
property of the application object, lRunIntroductoryForm, that
when .T. (the default) causes the Introductory form to be run
upon application startup.
|
|
New property
determines if tables are opened at startup
|
There is a new
property of the application object , lOpenAtStartup_DDS, that
when .T. (the default) causes the OpenAtStartup_DDS method to be
run upon application startup.
|
|
New properties
control logo and copyright display
|
There is a new
property of the application object, lCopyrightNotice, that when
.T. (the default) causes the product name, copyright notice, and
company name to be displayed.
There is a new
property of the application object, nLogoSeconds, that is used
when the user has turned off the display of the logo on the
Environment form. It determines the number of seconds (the
default is 4) the logo, product name, copyright notice, and
company name are displayed. They are not displayed at all if
nLogoSeconds is not greater than zero.
|
|
International
object instantiation
|
There is a new
property of the application object,
lInstantiateInternationalObject, that when .T. (the default is
.F.) causes the International object to be instantiated upon
application startup.
|
|
Switching data
sessions
|
There is a new
method of the application object, SetDataSession, which switches
to the data session whose data session ID is passed to the
method.
|
|
IsEOF method
|
There is a new
method of the application object, IsEOF, that returns .T. if the
record pointer is at EOF for the alias specified in the
parameters passed to the method. The parameters accepted are
cursor alias and data session ID.
|
|
IsBOF method
|
There is a new
method of the application object, IsBOF, that returns .T. if the
record pointer is positioned at the beginning of the cursor
specified in the parameters passed to the method. The parameters
accepted are cursor alias and data session ID.
|
|
GoEOF method
|
There is a new
method of the application object, GoEOF, that moves the record
pointer to EOF for the alias specified in the parameters passed
to the method. The parameters accepted are cursor alias and data
session ID.
|
|
Select_Alias
method
|
There is a new
method of the application object, Select_Alias, that selects the
alias specified in the parameters passed to the method. The
parameters accepted are cursor alias and data session ID.
|
|
OpenView method
|
There is a new
method of the application object, OpenView, that opens a view
with the USE command.
|
|
cDRVView_DatabaseName
property
|
There is a new
property of the application object, cDRVView_DatabaseName, that
contains the name of the database that contains the Data
Dictionary Remote View local or remote view, drv_v.
By default the property contains “system_v”, which is
the database that contains local views of system tables. This
property is used in the OpenAtStartup_PDS method.
|
|
Business Rules
object
|
There is a new
Business Rules object whose methods can be used to enforce
business rules within the application. Entries in the
nBusinessRulesType, cBusinessRulesClass, and
cBusinessRulesAutomationServer properties of the application
object determine whether the object is instantiated from a class
that is built into the application or from a DLL or EXE as an
automation server. Either way, the object reference is stored in
a property of the application object, oBusinessRules.
The Business
Rules class, ProBusinessRules, is in the ProBusinessRules class
library located in the project’s home directory. This class is
based on the VPMBusinessRules class in the VPMBusinessRules
class library located in the VPM home directory. The Business
Rules class contains custom methods that are called
automatically at various points in the application. These
methods are BlankFieldCheck, PreAdd, PreCopy, PreDelete,
PreRestore, PreSave, PostAdd, PostCopy, PostDelete, PostRestore,
and PostSave. If the BlankFieldCheck, PreAdd, PreCopy, PreDelete,
PreRestore, PreSave, PostAdd, or PostCopy method returns .F.,
the process that called the method is aborted. The form-level
versions of these methods are called as before, and in turn call
the Business Rules object methods. The call to the Business
Rules object methods can be controlled at the form level through
the form properties lRunBusinessRulesBlankFieldCheck,
lRunBusinessRulesPreAdd, etc.. The parameters passed to these
form-level and Business Rules object methods are:
1.
The name of the table or view that contains the record being
added, copied, deleted, saved, or restored.
2.
The name of the alias of the table of view.
3.
A value determined by the user that helps identify a particular
functionality that should occur in the method. When called from
a form, the value in the form’s cRulesID property is passed.
4.
An object containing the field values from the record. The
object is created with the SCATTER command.
|
|
GetFilter
method
|
There is a new
method of the application object, GetFilter, that returns the
expression of the filter in use on the cursor specified in the
parameters passed to the method. The parameters accepted are
cursor alias and data session ID.
|
|
GetRecordNumber
method
|
There is a new
method of the application object, GetRecordNumber, that returns
the record number of the current record in the cursor specified
in the parameters passed to the method. If the record pointer is
at EOF, zero is returned. The parameters accepted are cursor
alias and data session ID.
|
|
EvaluateExpression
method
|
There is a new
method of the application object, EvaluateExpression, that
returns the result of the evaluation of the expression passed to
the method. The parameters accepted are cursor alias, data
session ID, and expression to evaluate.
|
|
SetRelation
method
|
There is a new
method of the application object, SetRelation, that sets or
removes a relation from the cursor specified in the parameters
passed to the method. The parameters accepted are cursor alias,
data session ID, relation expression, and alias to set relation
into.
|
|
Finding a table
or view (DD1) record
|
There is a new
method of the application object, GetDD1Record, that finds a
record in the dd1_v view cursor that is open in the session
object’s private data session. Once the record is found, the
SCATTER command is used to create an object whose properties
have the same names as fields in the table. The object reference
for this object is stored in the oDD1Record property so that the
object’s properties can be referenced from wherever the
GetDD1Record method was called.
|
|
Finding a field
(DD2) record
|
There is a new
method of the application object, GetDD2Record, that finds a
record in the dd2_v view cursor that is open in the session
object’s private data session. Once the record is found, the
SCATTER command is used to create an object whose properties
have the same names as fields in the table. The object reference
for this object is stored in the oDD2Record property so that the
object’s properties can be referenced from wherever the
GetDD2Record method was called.
|
|
Finding a field
(DD2) record for a FK field
|
There is a new
method of the application object, GetDD2Record_FK, that finds a
record in the dd2_v view cursor that is open in the session
object’s private data session. It finds a record for a field
in a specified child table/view that has a specified parent
table/view selected as the reference table/view in the RI setup.
Once the record is found, the SCATTER command is used to create
an object whose properties have the same names as fields in the
table. The object reference for this object is stored in the
oDD2Record property so that the object’s properties can be
referenced from wherever the GetDD2Record_FK method was called.
|
|
Finding a index
tag (Dind) record
|
There is a new
method of the application object, GetDIndRecord, that finds a
record in the dind_v view cursor that is open in the session
object’s private data session. Once the record is found, the
SCATTER command is used to create an object whose properties
have the same names as fields in the table. The object reference
for this object is stored in the oDIndRecord property so that
the object’s properties can be referenced from wherever the
GetDIndRecord method was called.
|
|
Finding a
remote view (DRV) record
|
There is a new
method of the application object, GetDRVRecord, that finds a
record in the drv_v view cursor that is open in the session
object’s private data session. Once the record is found, the
SCATTER command is used to create an object whose properties
have the same names as fields in the table. The object reference
for this object is stored in the oDRVRecord property so that the
object’s properties can be referenced from wherever the
GetDRVRecord method was called.
|
|
New Remote page
in Data Builder
|
There is a new
Remote page of the Tables/Views pageframe in the Data Builder
form. The purpose of the page is to have a place to specify for
a local view the name of the database that contains the
equivalent remote view of the same name. Also on this page is a
Use Remote View checkbox, that when checked means that the
remote view should be used instead of the local view wherever
the local view is used in the DE of forms and reports (see
LocalToRemote method) as well as opened with the OpenView
method. This remote view information is stored in a new table,
S<Prefix>DRV.
|
|
SetControlProperties
method
|
There is a new
method of the application object, SetControlProperties, that is
called from the Init method of controls. The method sets the
value of selected control properties instead of having duplicate
code in the Init method of all controls that performs this
function. The properties include the Enabled (through Control
Security), cAlias, cDDTable, and cDDField properties.
|
|
New key
generation routine
|
There are two
new programs, S<Prefix>DGK1 and S<Prefix>DGK2, that
generate key values and store the last used values in a table,
S<Prefix>DGK. Each record in the table stores the last
used value for a specific field. This is now the default PK
generation routine in the Data Builder. The program
S<Prefix>DGK1 does the following:
1.
Opens the Generated Key table.
2.
Finds the record for the specified field or creates one.
3.
Locks the record.
4.
Passes the program S<Prefix>DGK2 the last value used.
5.
Stores the incremented value returned by S<Prefix>DGK2 in
the Generated Key record.
6.
Returns the incremented value so that it can be stored in the
key field.
|
|
Find
form for parameterized views
|
There
is a new property of the application object and forms,
cFindForm_SQL, that holds the name of the Find form for
parameterized views. The parameterized view Find form allows for
the entry of parameter values and performs a REQUERY on the view
cursor. By default, cFindForm_SQL in the application object
contains S<Prefix>CFS, which is the name of the generic
Find form used whenever the Find button on the toolbar is
clicked and the current cursor is a parameterized view. If the
current cursor is not a parameterized view the standard Find
form, S<Prefix>CFnd, is used. The form S<Prefix>CFS
is based on a new class, Find_SQL, that is in the ProGen and
VPMGen class libraries. If on a particular form a custom
parameterized view Find form should be used, the form’s
cFindForm_SQL property can be used to hold the name of that
custom Find form.
Note:
The parameterized view Find form requires that the view’s
parameter (variable) names follow a particular naming
convention. The name must be ?Find<field name in DD2
table>. Parameters whose name does not follow the naming
convention can be used in the view but must be handled
independently (i.e., must be in scope and contain the
appropriate value).
|
|
lFindForm_SQLOverride
property
|
There
is a new form property, lFindForm_SQLOverride, that when .T.
(the default is .F.) causes the standard Find form,
S<Prefix>CFnd, to be used even though the current cursor
is a parameterized view.
|
|
lStartWithFind
property
|
There
is a new form property, lStartWithFind, that when .T. (the
default is .F.) causes the Find form to come up when the form is
initially run. The parameterized view Find form or the standard
Find form is brought up depending on whether or not the current
cursor is a parameterized view and the value in the
lFindForm_SQLOverride property.
|
|
Bypassing VPM
error handling
|
There are two
new methods of the application object that allow for the
temporary bypass of VPM error handling so that particular errors
can be trapped at the point in the code where the error occurs.
The BypassErrorHandling_Start method turns VPM error handling
off. The BypassErrorHandling_Stop method turns VPM error
handling back on. If the BypassErrorHandling_Start method is
passed .T., any error that occurs before the
BypassErrorHandling_Stop method is run will be logged in the
Errors table. The BypassErrorHandling_Stop method returns a
value of .T. or .F. depending on whether or not an error
occurred. A common usage of these methods would be:
_SCREEN.oApp.BypassErrorHandling_Start()
<code that might
cause error you want to trap>
IF _SCREEN.oApp.BypassErrorHandling_Stop()
<code to handle error>
ENDIF
|
|
LocalToRemote
method
|
There is a new
method of the application object, LocalToRemote, that should be
called from the BeforeOpenTables method of the DE of forms and
reports that will use remote data. The LocalToRemote method
finds each view cursor in the DE and determines if the local or
remote version of the view should be used. If the remote view
should be used it changes the value in the Database property of
the cursor object to the name of the database that contains the
remote view. Note that since a local view and its equivalent
remote view must have the same name, only the Database property
value needs to be changed. The BeforeOpenTables method should
contain the following code:
SET TALK OFF
SET DELETED ON
_SCREEN.oApp.LocalToRemote(This)
|
|
AdminTool_Status
method
|
There is a new
method of the application object, AdminTool_Status, that returns
.T. if a specified Admin Tool is turned on in the application.
|
|
DeleteFor
method
|
There is a new
method of the application object, DeleteFor, that deletes
records from a table based on an expression. This method uses
the DELETE FOR <expression> command to delete the records.
Because the records are not deleted one at a time, the PreDelete,
PostDelete, and VPM RI routines are not run.
|
|
Suppressing
display of Object Builder background picture
|
The bitmap
displayed in the background of the Object Builder form is now
displayed only if it can be found in one of VPM’s directories.
By default, ObjectBuilderBackground.bmp is located in VPM’s
BITMAPS directory.
|
|
Suppressing
display of SetOrder WAIT message
|
The SetOrder
method of the application object by default displays a WAIT
message to notify the user that an index is being created for a
view cursor. The display of this message can now be suppressed
by passing .T. as the eighth parameter to SetOrder.
|
|
Finding a
Security view record
|
There is a new
method of the application object, GetSecRecord, that finds a
record in the Security_v view cursor that is open in the session
object’s private data session. Once the record is found, the
SCATTER command is used to create an object whose properties
have the same names as fields in the table. The object reference
for this object is stored in the oSecRecord property so that the
object’s properties can be referenced from wherever the
GetSecRecord method was called.
|
|
Null display
|
|
|
Requerying a
view used by a combobox or textbox
|
When a record
is added to a FK’s lookup table by selecting the Add option on
the right-click menu or by clicking the Add button on the
Picklist form, the PK value of the new record is automatically
entered into the FK field(s). If a combobox or textbox uses a
view to display information from the same lookup table, the view
cursor does not contain the new record because the view cursor
was populated when the form was run. To overcome this problem,
the Combobox_ and Textbox_ classes have a new property,
lFKUpdateRequeryView, that when .T. (the default) causes the
view specified in the control’s cLookupAlias property to be
requeried at the point where the FK is filled-in.
|
|
New parameter
in GetDD2Record method
|
There is a new
logical third parameter accepted by the GetDD2Record method of _SCREEN.oApp.
When .T. will cause the first field of the table or view
specified in the first parameter to be found in the
S<Prefix>DD2 table.
|
|
New parameter
in GetDIndRecord method
|
There is a new
numeric third parameter accepted by the GetDIndRecord method of
_SCREEN.oApp. It can be used to determine if a certain type of
tag exists for the table or view specified in the first
parameter. Parameter values are 1 (candidate), 2 (primary), or 3
(unique).
|
|
New parameter
in DeleteRecord method
|
There is a new
logical eighth parameter accepted by the DeleteRecord method of
_SCREEN.oApp. When .T. will cause the VPM RI routine to not
display the “Checking referential integrity...” WAIT
message.
|
|
New parameter
in Save method
|
There is a new
logical tenth parameter accepted by the Save method of _SCREEN.oApp.
When .T. will cause the VPM RI routine to not display the “Checking
referential integrity...” WAIT message.
|
|
OpenDBF method
now opens all databases
|
If a database
name is not passed to the OpenDBC method of _SCREEN.oApp, all
databases in the S<Prefix>DD0 table are now opened.
|
|
Save method can
now bypass VPM RI
|
There is a new
logical ninth parameter accepted by the Save method of _SCREEN.oApp.
When .T. prevents the VPM RI routine from being run and Audit
Trail records from being created.
|
|
BUILDER.DBF
fatal error
|
VPM now
automatically fixes the corruption that can occur with the memo
file of VFP’s BUILDER.DBF that causes a fatal error to be
generated upon entry into VPM.
|
|
PostDelete
method
|
|
|
PostSave method
|
|
|
Remote data
changes in PreSave, PostSave, PreDelete, and PostDelete methods
|
If code in the
PreSave, PostSave, PreDelete, or PostDelete methods make changes
to remote data, those changes are made within a transaction.
Therefore, when the transaction is committed or rolled-back,
those remote data changes must also be committed or rolled-back.
That will happen automatically as long as a different connection
is not used to make those changes. If a different connection is
used, that connection can be included in the SQLCOMMIT or
SQLROLLBACK that is executed. There is a new property of _SCREEN.oApp,
cAdditionalConnectionHandles, that can be used to include
additional connections in the SQLCOMMIT or SQLROLLBACK. For more
than one additional connection, separate the connection handles
with commas in the property.
|
|
SQL Find form
behavior
|
There is a new
property of the Form_Toolbar class, lFindForm_SQL_NoEntriesOK,
that when set to .T. will allow the user to not make any entries
on the SQL Find form, click OK, and be presented with a List
form showing all records. The property is .F. by default,
meaning the user has to enter at least one parameter value
before clicking OK.
|
|
Alternate
captions for the SQL Find form
|
There is a new
property of the Form_Toolbar class, cFindForm_SQL_AltCaptions,
that can be used to specify alternate label captions to be
displayed on the SQL Find form. The captions should be entered
into the property in the order in which the associated
parameters will be displayed on the SQL Find form. Multiple
captions should be separated by semi-colons. Captions can be
entered selectively, meaning that only those captions that
should be different than the captions that would be used by
default from the data dictionary need to be specified.
|
|
SQL Find form
adds “%”
|
The SQL Find
form now adds “%” to TRIMmed entries if the Find is being
performed on a remote view. With remote views, the parameters
need to be created with the LIKE operator and have “%”
appended to parameter values to make a match on partial entries.
|
|
New UpdateFor
method
|
There is a new
method, UpdateFor, of _SCREEN.oApp that updates records in a
specified cursor using the UPDATE command.
|
|
New
specification of F2 Picklist table or view
|
The Integrity
page of the Data Builder has a new field that is accessible when
setting up Referential type Integrity. The new field allows for
the specification of a table/view to be used just for the F2
Picklist. If an entry is not made in this field, the reference
table/view (Ref (PK) T/V) entry is used.
|
|
New
specification of validation table or view
|
The Integrity
page of the Data Builder has a new field that is accessible when
setting up Referential type Integrity. The new field allows for
the specification of a table/view to be used just for the
validation of the FK value. If an entry is not made in this
field, the reference table/view (Ref (PK) T/V) entry or Picklist
table/view entry is used, in that order depending on which of
them is filled-in. A parameterized view may be used to validate
the FK value as long as the parameter name is PKValue and a FK
Tag has been specified.
|
|
VPM RI routine
can now use views to update related tables
|
When setting up
Referential type Integrity in the Data Builder for a FK in a
view, you will now normally not make an entry in the Ref (PK)
T/V field. You will instead fill in the Picklist T/V and Valid
T/V fields to provide Picklist and validation functionality. You
can, however, have the VPM RI routine update the view’s source
table by filling in the Ref (PK) T/V field. This will only work
if the view has a filter on the FK whose parameter has a name of
ParentPKValue. This functionality is particularly useful if you
want the VPM RI routine to update remote data.
|
|
Blank and
duplicate PK checks can now be performed for remote views
|
The VPM RI
routine will now perform a blank PK check for a remote view
cursor record as long as a PK Tag has been specified for the
view in the Data Builder.
The VPM RI
routine will perform a duplicate PK check for a remote view
cursor record if a remote view has been created that can be used
for this purpose. The view must have a filter on the PK whose
parameter has a name of PKValue. The view must be specified in a
new field on the Remote page of the Data Builder for the view
being checked and must reside in the database specified on the
same page.
|
|
Displaying Set
information in a combobox
|
Previously,
when Set Integrity information was displayed in the dropdown
list of a combobox, both the code and description were
displayed. The lLookupDescription property setting determined if
the code (.F.) or description (.T.) was displayed first. A new
property, lShowSetValueAndDescription , has been added to the
Combobox_ class to provide control over the dropdown list
display. If the property is set to .F. (the default), only the
code or description is displayed, depending on the
lLookupDescription setting. If .T., both the code and
description are displayed.
|
|
New combobox
property
|
There is a new
property of the Combobox_ class, lOverrideWidth, that when set
to .T. will prevent code in the Init method from resizing the
control. Currently, a combobox is only resized when displaying
Set Integrity information.
|
|
Closing view
source tables
|
In the field
validation, F2 Picklist, and VPM RI routines, the view source
tables that are opened by VFP when a view is opened are now
closed when the view cursor is closed.
|
|
PerformStartupAction
now run when error occurs
|
|
|
Object Builder
now runs external programs
|
|
|
View filter
|
|
|
_SCREEN.ActiveForm
no longer used
|
|
|
Referential
Integrity
|
|