1. Add a Rung for each required SQL query.
1. 1 Create a string tag (Data type = DBGW_strWrite) for SQL query.
1.2 Copy tested SQL query from Microsoft SQL Server Management Studio to this string tag.
Note: $r$l$t (Same as CRLFTAB = Carriage return – Line feed – Tab) or $r$l (Same as CRLF = Carriage return – Line feed) don’t have to be removed. SQL query will work anyway.
1.3 The tags “Trig_Select” and “Trig_Update” has to be set by your logic!
2. Start execution of SQL query by changing DBGW1.Trigger.
Note: Execution finished when: DBGW1.Trigger=DBGW1.TriggerDone.
3. Execution successfully. Resetting triggering tags and DBGW_QueryNo
4. Execution faulted. After 3 retries DBGW_QueryNo will be reset, and hereby opens up for new SQL queries
5. Open DBGW_Demo.ACD for copying or for inspiration.