Home » U++ Library support » U++ SQL » Sql::Execute()
Sql::Execute() [message #9414] |
Sun, 06 May 2007 10:55 |
|
I think it would be better if Sql::Execute called ClearError before executing the sql statement. Now if I use global SQL object I have to do sth like this everywhere to be sure WasError will return the correct value. It's unecessary IMO:
void Commissions::InsertCommission()
{
SQL.ClearError(); //execute should clear the error
SQL * ::Insert(PROWIZJE)
(KOD, list(KOD))
(PROCENT, list(PROCENT))
(KWOTA, list(KWOTA));
if(SQL.WasError())
list.CancelInsert();
else
list(ID) = GetInsertedId(SQL.GetSession(), PROWIZJE_ID_SEQ);
}
|
|
|
|
Goto Forum:
Current Time: Wed Apr 24 13:19:18 CEST 2024
Total time taken to generate the page: 0.03203 seconds
|