errCode2 = SQLAllocHandle(SQL_HANDLE_DBC, myEnv, &myCon);
}
/* get PCs made by the manufacturer */
SQLBindParameter(execStat, 1, SQL_CHAR, …, maker, …);
SQLExecute(execStat);
SQLBindCol(execStat, 1, SQL_CHAR, model, sizeof(model), &colInfo);
SQLBindCol(execStat, 2, SQL_FLOAT, speed,
sizeof(speed), &colInfo);
SQLBindCol(execStat, 3, SQL_INTEGER, ram,
sizeof(ram), &colInfo);
}
/* get Laptops made by the manufacturer */
SQLPrepare(execStat,
“SELECT * FROM Laptop WHERE model IN (” ||
“SELECT model FROM Product ” ||
“WHERE maker = ? AND ” ||
“type = ‘laptop’”,