Sql Fetch - HEIDENHAIN TNC 320 User Manual

Conversational programming
Hide thumbs Also See for TNC 320:
Table of Contents

Advertisement

8
Programming: Q Parameters
8.9
Accessing tables with SQL commands

SQL FETCH

SQL FETCH reads the row addressed with INDEX from the result set,
and places the table entries in the bound (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 (erroneous handle or index too
large)
Database: SQL access ID: Q parameter with the
handle
SELECT)
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 enter an index, the first
row is read (n=0).
Either enter the row number directly or program the
Q parameter containing the index.
276
for identifying the result set (also see SQL
TNC 320 | User's Manual HEIDENHAIN Conversational Programming | 5/2013
Row number is transferred in 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

Advertisement

Table of Contents
loading

Table of Contents