
Accessing tables with SQL commands
9.9
9
TNC 320 | User's Manual
HEIDENHAIN Conversational Programming | 3/2014
303
Result set
The selected rows are numbered in ascending order within the
result set, starting from 0. This numbering is referred to as the
index.
The index is used for read and write accesses, enabling a
row of the result set to be specifically addressed.
It can often be advantageous to sort the rows in the result set. Do
this by specifying the table column containing the sorting criteria.
Also select ascending or descending order (
SQL SELECT ... ORDER
BY ...
).
The selected rows that were transferred to the result set are
addressed with the
HANDLE
. All following SQL commands use the
handle to refer to this "set of selected columns and rows."
When concluding a transaction, the handle is released (
SQL
COMMIT...
or
SQL ROLLBACK...
). It is then no longer valid.
You can edit more than one result set at the same time. The SQL
server assigns a new handle for each "Select" command.
"Binding" Q parameters to columns
The NC program does not have direct access to the table entries in
the result set. The data must be transferred in Q parameters. In the
other direction, the data is first prepared in the Q parameters and
then transferred to the result set.
Specify with
SQL BIND ...
which table columns are mapped to
which Q parameters. The Q parameters are "bound" (assigned) to
the columns. Columns that are not bound to Q parameters are not
included in the read-/write-processes.
If a new table row is generated with
SQL INSERT...,
the columns
not bound to Q parameters are filled with default values.
Summary of Contents for TNC 320
Page 4: ...Controls of the TNC 4 TNC 320 User s Manual HEIDENHAIN Conversational Programming 3 2014 ...
Page 5: ...Fundamentals ...
Page 16: ...Contents 16 TNC 320 User s Manual HEIDENHAIN Conversational Programming 3 2014 ...
Page 43: ...1 First Steps with the TNC 320 ...
Page 63: ...2 Introduction ...
Page 81: ...3 Programming Fundamentals file management ...
Page 124: ......
Page 125: ...4 Programming Programming aids ...
Page 152: ......
Page 153: ...5 Programming Tools ...
Page 180: ......
Page 181: ...6 Programming Programming contours ...
Page 232: ......
Page 233: ...7 Programming Data transfer from DXF files or plain language contours ...
Page 251: ...8 Programming Subprograms and program section repeats ...
Page 267: ...9 Programming Q Parameters ...
Page 337: ...10 Programming Miscellaneous functions ...
Page 357: ...11 Programming Special functions ...
Page 379: ...12 Programming Multiple Axis Machining ...
Page 406: ......
Page 407: ...13 Manual operation and setup ...
Page 462: ......
Page 463: ...14 Positioning with Manual Data Input ...
Page 468: ......
Page 469: ...15 Test run and program run ...
Page 497: ...16 MOD functions ...
Page 525: ...17 Tables and overviews ...