Simple Query

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



This flow chart shows the typical pattern for a single simple 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 and SQL CONSTRUCT QUERY statements are shown for completeness, but are optional.

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-2020 Micro Focus or one of its affiliates.