Hello,
i don't understand what is going to happen...
this is my simple code:
--------------------------------------------------------------------------
conn->setAutoCommit(0);
preparedStmt = conn->prepareStatement("call spLogin(?,?,?)");
preparedStmt->setString(1, (const caracter *) username);
preparedStmt->setString(2, (const caracter *) password);
preparedStmt->setInt(3, age);
ret = preparedStmt->executeQuery();
if (ret->next()) {
id_user = ret->getInt(1)); // idUserinfo
conn->commit(); <-- THIS LINE DOES NOTHING!!!
}
When I execute the commit function no record was updated in the database.
If I replace the stored with embedded SQL it works very well!
i don't understand what is going to happen...
this is my simple code:
--------------------------------------------------------------------------
conn->setAutoCommit(0);
preparedStmt = conn->prepareStatement("call spLogin(?,?,?)");
preparedStmt->setString(1, (const caracter *) username);
preparedStmt->setString(2, (const caracter *) password);
preparedStmt->setInt(3, age);
ret = preparedStmt->executeQuery();
if (ret->next()) {
id_user = ret->getInt(1)); // idUserinfo
conn->commit(); <-- THIS LINE DOES NOTHING!!!
}
When I execute the commit function no record was updated in the database.
If I replace the stored with embedded SQL it works very well!