Conversion steps

Converting a DB-Library program to its Client-Library equivalent generally involves the following steps:

  1. Replace DB-Library header file names with the Client-Library header file name (see “Header files”).

  2. 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.”

  3. Perform the conversion:

  4. Replace or remove DB-Library declarations, as appropriate.

  5. 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.

NoteThe 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”.