This illustration describes using OCIBindByName() to associate placeholders with program variables. It shows one SQL statement: INSERT INTO emp VALUES (:empno, :ename, :job, :sal, :deptno). The call OCIBindByName() associates the placeholders in the SQL statement as follows:
| Placeholder | :empno | :ename | :job | :sal | :deptno |
|---|---|---|---|---|---|
| Address | &empno | ename | job | &sal | &deptno |
| Data Type | integer | string | string | integer | integer |
| Length | sizeof(empno) | strlen(ename)+1 | strlen(job)+1 | sizeof(sal) | sizeof(deptno) |