Home » U++ Library support » U++ SQL » OkCommit problem
Re: OkCommit problem [message #5136 is a reply to message #5135] |
Wed, 06 September 2006 20:37   |
zsolt
Messages: 702 Registered: December 2005 Location: Budapest, Hungary
|
Contributor |
|
|
luzr wrote on Wed, 06 September 2006 19:51 | Seems like a good idea. However, "Retry" is a bit strange IMO - if you are not able to commit, there is something pretty wrong with your database connection...
Maybe, in that case, application abort would be in place.
Mirek
|
Yes, you are right. I changed it to this:
bool OkCommit(SqlSession& session, const char *msg) {
if(ErrorRollback(session, msg))
return false;
session.Commit();
if(session.WasError())
return false;
session.ClearError();
return true;
}
Application abort would be too drastic, I think, because this is one of the connections only. Programmer can use return value of OkCommit().
|
|
|
Goto Forum:
Current Time: Mon Jun 23 15:48:29 CEST 2025
Total time taken to generate the page: 0.06579 seconds
|