Obtaining the Results
For the sake of simplicity, our SQL statements thus far have neither required input data nor produced output data. Of course, inputting and outputting data are important functions of Open SQL, and class
RWDBOSql provides mechanisms for both:
Input binding is the mechanism for passing data to your statements.
Output binding and
fetching are the mechanisms for retrieving results.
To use
RWDBOSql for exchanging data with your database in either direction, you bind your own program variables to the statement (for input binding), or to a result set (for output binding).
To provide Open SQL with information about your program variables, you use the template class
RWDBTBuffer. When you use
RWDBTBuffer with
RWDBOSql, your data is
not converted unless absolutely necessary, and
no internal copy of your data is made unless absolutely necessary. Avoiding these data conversions and internal copies can result in greater performance for Open SQL in comparison with the classes of the standard API, such as
RWDBInserter and
RWDBReader.
The next section explains
RWDBTBuffer in more detail.