Description
This event is executed before the create event for the window and allows you to circumvent the normal event processing that creates the DataSet used by the window.
Syntax
bforward = DSOINSTANCE (ctrlentID, ctrlclassID, DSOName, XOName, DSHandle, XOHandle, flags)
Parameters
DSOINSTANCE accepts arguments for the following parameters.
Parameter | Description | ||||||
---|---|---|---|---|---|---|---|
ctrlentID | Has the format WindowName.ControlName, where WindowName is the identifier of the window that contains the affected control, and ControlName is the identifier of the control. Notice that a period separates the two values. | ||||||
ctrlclassID | The type of control that recognizes the event. The window control type is the only valid entry. | ||||||
DSOName | The name of the DataSet instance. | ||||||
XOName | The name of the Connection object used to establish the DataSet. | ||||||
DSHandle | The DataSet handle passed back to DSOINSTANCE. | ||||||
XOHandle | The Connection object handle passed back to DSOINSTANCE. | ||||||
flags | An @FM delimited array. Refer to the XO_EQUATES and DS_EQUATES records for the layout of these options.
|
Returns
True or false. If false, then program execution returns to the calling procedure. If true, then event processing goes to the next level.
See also
XOInstance(), DSMethod (DS_ADDREF$)
Remarks
The DSOINSTANCE event allows you to supply a DataSet instance programmatically. For example, if you create a DataSet that contains look-up information, like code tables, and you store the DataSet handle globally so multiple forms can use it, you can supply that DataSet to a form in the DSOINSTANCE event. Since an additional form will be using the DataSet, you must increment the reference count for the DataSet using the DSMethod DS_ADDRESS$ or the DataSet will be destroyed when the form is destroyed. If you supply the DataSet, then return 0 from the event handler.