if(errCode3) {
printf(”Error for SQL_ HANDLE_STMT.\n”);
exit(1);
}
/* ask user for manufacturer, model, speed, RAM, hard-disk, */
/* & price of a new PC */
SQLPrepare(execStat, “INSERT INTO Product VALUES(?, ?, ?)”,
SQL_NTS);
SQLBindParameter(execStat, 1, SQL_CHAR, …, pmaker, …);
SQLBindParameter(execStat, 2, SQL_CHAR, …, pmodel, …);
SQLBindParameter(execStat, 3, SQL_CHAR, …, ptype, …);
SQLExecute(execStat);
SQLPrepare(execStat, “INSERT INTO PC VALUES(?, ?, ?, ?, ?)”,
}
9.5.2
a)
#include sqlcli.h
SQLHENV myEnv;