© 2021 AVEVA Group plc and its subsidiaries. All rights reserved. Page 4
RecipeGetMessage() Function ................................................................................................................ 28
Applying Security to Recipes ...................................................................................................................... 29
Chapter 3 Working with SQL Databases from InTouch ..................................... 31
About Working with SQL Databases from InTouch ............................................................................... 31
Setting Up a Data Source ..................................................................................................................... 32
Mapping InTouch Tags to Database Columns ....................................................................................... 32
Configuring the SQL Server String Delimiter in Bind Lists .......................................................................... 34
Defining the Structure of a New Table ................................................................................................. 35
Working with Database Applications ................................................................................................... 37
SQL Server Database Applications ............................................................................................................. 37
Microsoft Access Database Applications.................................................................................................... 38
Oracle Database Applications .................................................................................................................... 39
Performing Common SQL Operations in InTouch .................................................................................. 40
Connecting and Disconnecting the Database ............................................................................................ 43
SQLConnect() Function ........................................................................................................................... 44
SQLDisconnect() Function ....................................................................................................................... 44
Creating a New Table ................................................................................................................................. 45
SQLCreateTable() Function ..................................................................................................................... 45
Deleting a Table .......................................................................................................................................... 45
SQLDropTable() Function ........................................................................................................................ 46
Retrieving Data from a Table ..................................................................................................................... 46
SQLSelect() Function ............................................................................................................................... 47
SQLGetRecord() Function ....................................................................................................................... 49
SQLNumRows() Function ........................................................................................................................ 49
SQLFirst() Function ................................................................................................................................. 50
SQLNext() Function ................................................................................................................................. 50
SQLPrev() Function ................................................................................................................................. 50
SQLLast() Function .................................................................................................................................. 51
SQLEnd() Function .................................................................................................................................. 51
Writing New Records to a Table ................................................................................................................. 52
SQLInsert() Function ............................................................................................................................... 52
SQLInsertPrepare() Function .................................................................................................................. 53
SQLInsertExecute() Function .................................................................................................................. 53
SQLInsertEnd() Function ......................................................................................................................... 54
Updating Existing Records in a Table ......................................................................................................... 54
SQLUpdate() Function ............................................................................................................................ 55
SQLUpdateCurrent() Function ................................................................................................................ 55
Deleting Records from a Table ................................................................................................................... 56
SQLClearTable() Function ....................................................................................................................... 56
SQLDelete() Function .............................................................................................................................. 57
Executing Parameterized Statements ........................................................................................................ 58
SQLSetStatement() Function .................................................................................................................. 58
SQLAppendStatement() Function ........................................................................................................... 59
Creating a Statement or Loading an Existing Statement from a File ......................................................... 59
SQLLoadStatement() Function ................................................................................................................ 59