我有 ORA-00933 错误消息。temp 是 struct,它存储来自 cin 的值。你知道如何解决这个问题吗?
try {
Statement* stmtEmp = conn->createStatement("INSERT INTO employees (employeenumber, lastname, firstname, extension, email, officecode, reportsto, jobtitle) VALUES ( :1, :2, :3, :4, :5, :6, :7, :8);");
stmtEmp->setInt(1, temp->employeeNumber);
stmtEmp->setString(2, temp->lastName);
stmtEmp->setString(3, temp->firstName);
stmtEmp->setString(4, temp->extension);
stmtEmp->setString(5, temp->email);
stmtEmp->setString(6, temp->officecode);
stmtEmp->setInt(7, temp->reportsTo);
stmtEmp->setString(8, temp->jobTitle);
stmtEmp->executeUpdate();
conn->commit();
conn->terminateStatement(stmtEmp);
cout << "The new employee is added successfully." << endl;
}
catch (SQLException& sqlExcp) {
cout << sqlExcp.getErrorCode() << ": " << sqlExcp.getMessage() << endl;
}