Which_Data_Set - BaseData_Set

Returns object id of DataDictionary Object owning specified table

Type: Property

Access: Read-Only

Data Type: Handle

Parameters: Integer iFile

ParameterDescription
iFileTable number


Syntax
 Property Handle Which_Data_Set

Read Access: Get Which_Data_Set iFile to HandleVariable


Description

Which_Data_Set returns the DataDictionary Object (DDO) id of the object owning the specified table. It returns 0 if neither this object nor any of its Servers owns the specified table.

Most likely, you will want to send this to the Main_DD of the current component (view or dialog).


Data_Set vs. Which_Data_Set

Which_Data_Set scans the DDO and its parent DDOs for a server that matches the table number, while Data_Set does this and also scans "down" the DDO tree (i.e. children of the DDO receiving the message).

Which_Data_Set only scans up the DDO tree. Data_Set will only search the whole tree when Which_Data_Set failed to find a DDO with Main_File set to the table number passed to the function. For traversing down and up the tree, the function uses Data_Set_Client_Count, Data_Set_Client, Data_Set_Server_Count and Data_Set_Server.

Data_Set scans up and then down the DDO tree.


Example

Using the DDO structure below, Which_Data_Set passing vendor.file_number fails when send to a DDO for the Orderheader table, while Data_Set would find it. Data_Set would look at OrderDetail DDO and from there up in the tree to find vendor.