U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
zsolt is currently offline  zsolt
Messages: 705
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().
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can I create DBF files?
Next Topic: MySqlSession::EnumTables -> why uppercase?
Goto Forum:
  


Current Time: Thu Sep 10 05:21:21 GMT+2 2026

Total time taken to generate the page: 0.00719 seconds