
OMRON
CHAPTER 12 – Databases
Release 2.0
Page 213
SHAPE {parent-command} [[AS] name]
APPEND ({child-command} [[AS] name] RELATE parent-field TO child-
field)
[,({child2-command} ...)]
Note:
By default, the child recordsets in the parent recordset will be called Chapter 1,
Chapter 2, etc., unless you use the optional [[AS] name] clause to name the child
recordset.
Note:
You can nest the SHAPE command. The {parent-command} and/or {child-
command} can contain another SHAPE statement.
Note:
The {parent-command} and {child-command} do not have to be SQL SELECT
statements. They can use whatever syntax is supported by data provider.
Note:
A child recordset will be automatically opened/closed whenever its Parent recordset
is opened/closed. A child recordset is effectively a field of its parent recordset
therefore whenever a new record is selected in the parent a new child recordset will
be generated.
Creating a Datashape connection.
♦
Create DSN file specifying the required database as the Data Source
♦
Configure a Connection to the DSN file. In the connection string type
Provider=MSDataShape;
FILEDSN=<your file name>.dsn
♦
Configure a Recordset as SQL Text and enter the required shape command as the Source. (See
Datashape Source examples).
♦
After successfully adding a Datashape Recordset it is now possible to add a Child Recordset to
the existing Recordset by selecting the right menu option ‘Add Recordset’ which will now be
enabled. If the Connection is ‘Live’ a list of valid child recordset names will be entered in the
Source ComboBox
♦
Field associations can be added to Child recordsets in the normal manner.
Child recordsets can be accessed via Script command in a similar manner to normal recordsets
bResult = DBState( "DataShape.Customers.Orders.Details", "Open" )
Note:
Child recordsets are not supported in the Database function dialog
Simple Relation Hierarchy example:
SHAPE {select * from customers}
APPEND ({select * from orders} AS rsOrders
RELATE customerid TO customerid)
The parent recordset contains all fields from the Customers table and a field called rsOrders.
rsOrders provides a reference to the child recordset, and contains all the fields from the Orders table.
The other examples use a similar notation.
Содержание CX-SUPERVISOR - V2.0
Страница 2: ...CX Supervisor User Manual Software Release 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor User Manual OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor User Manual OMRON Page iv Revision 2 0...
Страница 11: ...CX Supervisor User Manual OMRON Page viii Revision 2 0...
Страница 13: ...CX Supervisor User Manual OMRON Page x Revision 2 0...
Страница 15: ...CX Supervisor User Manual OMRON Page xii Revision 2 0...
Страница 17: ...CX Supervisor User Manual OMRON Page xiv Revision 2 0...
Страница 19: ...CX Supervisor User Manual OMRON Page xvi Revision 2 0...
Страница 21: ...CX Supervisor User Manual OMRON Page xviii Revision 2 0...
Страница 23: ......
Страница 67: ......
Страница 97: ......
Страница 137: ...CHAPTER 7 Graphics Library OMRON Page 114 Release 2 0...
Страница 183: ...CHAPTER 9 Animation OMRON Page 160 Release 2 0...
Страница 215: ......
Страница 263: ......
Страница 269: ......
Страница 274: ...OMRON CHAPTER 16 Connecting to Omron Industrial Components Release 2 0 Page 251...
Страница 275: ......
Страница 285: ......
Страница 319: ......
Страница 331: ......
Страница 351: ......
Страница 359: ...GLOSSARY OF TERMS CX Supervisor User Manual OMRON Page 336 Release 2 0...