Call-Level Interfaces
Call-level interfaces are commonly used in client/server architectures, in
which the application program (the client) resides on one computer and the DBMS
(the server) resides on a different computer. The application calls CLI functions
on the local system, and those calls are sent across the network to the DBMS
for processing.
A call-level interface is similar to dynamic SQL, in that SQL statements are
passed to the DBMS for processing at runtime, but it differs from embedded SQL
as a whole in that there are no embedded SQL statements and no precompiler is
required.
Using a call-level interface typically involves the following steps:
1 The application calls a CLI function to connect to the DBMS.
2 The application builds an SQL statement and places it in a buffer. It then
calls one or more CLI functions to send the statement to the DBMS for preparation
and execution.
3 If the statement is a SELECT statement, the application calls a CLI function
to return the results in application buffers. Typically, this function returns
one row or one column of data at a time.
4 The application calls a CLI function to disconnect from the DBMS.