User Guide
479
OLE Automation Object Reference
WTable
This is a single table in the current .MSI or .MSM.
VBScript Example (lines are numbered for clarity):
1. ' assume tblControl is assigned to the Control table
2. MsgBox tblControl.Name ' message box of table name "Control"
3. MsgBox tblControl.Keys ' message box of keys "Dialog_,Control"
WTables
This is a collection of tables in the current .MSI or .MSM file.
VBScript Example (lines are numbered for clarity):
1. Dim WFWI As WFWI.Document
2. Dim tbls As WTables
3. Dim tblComponent As WTable
4. Dim tbl As WTable
5. Set WFWI = CreateObject("WFWI.Document")
6. Set tbls = WFWI.Wtables
7. ' Get Component table, you could use the following line instead:
8. ' WFWI.Wtables.Item "Component"
9. Set tblComponent = WFWI.WTables("Component")
10. ' Enumerate all tables
11. For Each tbl In tbls
12. ' Do something with each table
13. Next
Child of WTables
Properties BSTR Name(): returns the name of the table
BSTR Keys(): returns a comma-separated list of keys for the table
Methods WRows WRows(): returns the collection of rows for this table
WColumnDefs WColumnDefs(): returns the collection of column definitions for the table
WRow NewWRow(BOOL bAddToTable): creates a new row for this table. bAddToTable
specifies if the row is added to the table or created, but not added. Default value is TRUE,
to add to table.
Child of WFWI.Document
Methods WTable Item(BSTR bsTableName): returns table object, gives table name. Item is
the default method.