Advanced Query
Flowchart

 <     >         Connection Statements       Query Statements       Advanced Statements      Advanced Query Example       Table of Contents

 

This flow chart shows the typical pattern for a single advanced query using InstantSQL.  Error handling is not shown in order to simplify the flow chart.  An application should check for errors following each InstantSQL statement as shown in the status inquiry flow charts.

The SQL SET USER statement can be used before the SQL CONNECT DATASOURCE statement, if desired.  The user information can also be specified in the SQL CONNECT DATASOURCE statement.

The SQL CONSTRUCT QUERY statement can be used prior to the SQL PREPARE QUERY statement to construct the SQL statement text string to be prepared.

The loop to process rows of the result set (the loop on the right side of the flow chart) may be omitted for queries that do not produce a result set, such as INSERT, UPDATE, or DELETE queries.  The SQL DESCRIBE QUERY statement returns information that can help the application program determine if there is a result set.  When there is no result set, the value of sql-QryNoCols returned in the query description group is zero.

Additional queries against the same data source can be prepared and executed prior to disconnecting from the data source.

Additional connections can be established before shutting down InstantSQL.

Copyright ©2000 Liant Software Corp.  All rights reserved.