Previous Topic

Next Topic

Inhoudsopgave

Book Index

RecordSQL Property

Property Property RecordSQL: String

Description

Specifies the dynamic SQL select statement used to populate the selected record for the Edit form.

Remarks

The RecordSQL property has to be used in combination with the TwoQueryFrm Property. This property has to be set to true in case a two query Edit form is required.

You need to create a join between the record data and the grid data. Use a field that is present in both the grid and the record dataset to join them. Use the following format to join these fields:

Fieldname=:Fieldname

In most cases you will create your own stored procedure (SIP_sel_xxxRecord) with parameters that return records from your custom data table as a result set for populating the record dataset of the Edit form.

Use the following format to join the fields:

@Fieldname=:Fieldname

Tip

If you browse the main query (by using the navigator buttons) you may want to see default record values even if there is no related record available in your custom data table.

You have to modify the SIP_sel_xxxRecord stored procedure to force a resultset even if there's no related record by returning a record with default field values. If you browse the main query then there will always be a record in the Record tabsheet (user data or defaults).

Furthermore, you have to modify the SIP_upd_xxx stored procedure to check if an update or insert is required.