• 62
    0

    This program connects to ORACLE, declares and opens a cursor, fetches the names, salaries, and commissions of all sales people, displays the results, then closes the cursor.  The following shows a query that uses an explicit cursor, selecting data into a host structure: #include <stdio.h> #include <sqlca.h>#define UNAME_LEN 20 #define PWD_LEN 40 /* * Use the ...
  • 53
    0

    The following example program connects to Oracle, then loops, prompting the user for an employee number. It queries the database for the employee’s name, salary, and commission, displays the information, and then continues the loop. The information is returned to a host structure. There is also a parallel indicator structure to signal whether any of ...