Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

12.4 Open SQL and the Standard API

As you can see from Section 12.3, the Open SQL interface is smaller and more specialized than the standard DBTools.h++ interface. It includes only those classes necessary to encapsulate an SQL statement (RWDBOSql), to encapsulate data bound to individual parameters or result columns on a statement (RWDBTBuffer), and to provide row operations and semantics for collections of RWDBTBuffers (RWDBMultiRow).

The important point, however, is that the Open SQL interface is completely compatible with the standard DBTools.h++ interface. You can use Open SQL and the standard DBTools.h++ interface together in both new and existing projects. Furthermore, you don't have to rewrite all your existing code to benefit from Open SQL. You can incorporate Open SQL into existing programs by simply identifying and rewriting those parts of your existing code that may benefit from the added performance and control that Open SQL provides.

Open SQL classes are completely integrated with the classes of the standard DBTools.h++ API. For example, class RWDBOSql interacts with class RWDBConnection, since a connection is the means of performing work with a database. When invoking execute() on an RWDBOSql, you specify a connection on which the SQL statement shall be executed.

Class RWDBMultiRow allows RWDBTBuffers and the data inside to be exchanged with code that uses the existing API. A single value or row of values from your RWDBTBuffers can be converted into RWDBValues or RWDBRows for easy data exchange with your existing code. Also, RWDBSchemas representing query results or database tables in your existing code can be used to automatically generate RWDBTBuffers. In this way, you can get a headstart on writing your database code with the Open SQL API.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.