Converting a DB-Library program to its Client-Library equivalent generally involves the following steps:
Replace DB-Library header file names with the Client-Library header file name (see “Header files”).
Plan the code conversion. Client application code can be split roughly into the categories covered in this chapter:
Each section shows equivalent DB-Library and Client-Library program logic. Before beginning the conversion, read these sections to ensure that you understand Client-Library fundamentals. Other, more advanced features are discussed in Chapter 6, “Advanced Topics.”
Perform the conversion:
Replace or remove DB-Library declarations, as appropriate.
Replace DB-Library function calls with their Client-Library or CS-Library equivalents, changing program logic as necessary. Table A-1 lists DB-Library routines and their Client-Library equivalents.
The code fragments in this chapter use an EXIT_ON_FAIL example macro,
as specified in the migration sample dbtoctex.h.
For information on this macro, see “Return code error checking in code fragments”.