HEIDENHAIN TNC 320 User Manual page 357

Compact contouring control
Hide thumbs Also See for TNC 320:
Table of Contents

Advertisement

SQL FETCH
SQL FETCH reads the row addressed with INDEX from the
result set,and places the table entries in the linked (assigned) Q
parameters. The result set is addressed with the HANDLE.
SQL FETCH takes into account all columns entered in the "Select"
command.
Parameter no. for result: Q parameter in which the
SQL server reports the result:
0: No error
1: Error occurred (incorrect handle or index too
large)
Database: SQL access ID: Q parameter with the
handle
for identifying the result set
Further Information:
Database: Index for SQL result: Row number
within the result set. The table entries of this row
are read and are transferred into the bound Q
parameters. If you do not specify the index, the first
row (n=0) is read.
Either enter the row number directly or program the
Q parameter containing the index
HEIDENHAIN | TNC 320 | Conversational Programming User's Manual | 9/2016
Accessing tables with SQL commands
"SQL SELECT", page 355
Row number is transferred to a Q
parameter
11SQL BIND Q881
"TAB_EXAMPLE.MEAS_NO"
12SQL BIND Q882
"TAB_EXAMPLE.MEAS_X"
13SQL BIND Q883
"TAB_EXAMPLE.MEAS_Y"
14SQL BIND Q884
"TAB_EXAMPLE.MEAS_Z"
. . .
20SQL Q5 "SELECT
MEAS_NO,MEAS_X,MEAS_Y,
MEAS_Z FROM TAB_EXAMPLE"
. . .
30 SQL FETCH Q1HANDLE Q5 INDEX
+Q2
Row number is programmed directly
. . .
30 SQL FETCH Q1HANDLE Q5 INDEX5
9
9.9
357

Advertisement

Table of Contents
loading

Table of Contents