
EndTransaction
EndTransaction is used to release the database without closing the database, it can also be used to change the mode of the transaction.unsigned __int64 EndTransaction( );
Parameters
| void |
Return Values
If the method succeeds, the return value is zero else see error codes for more details.Remarks
- Need not be called if the database is to be closed through CloseDatabase or through the destructor.
Example Use
- C++
#include "ODBPP.h"
int wmain(int argc, wchar_t* argv[])
{
unsigned __int64 error;
const char16_t *message;
CODBPP database;
if(database.OpenDatabase(u"YourDatabse") == NO_ERROR){
while(error == NO_ERROR){
if((error = database.BeginTransation()) == NO_ERROR){
...
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
MessageBox(message);
database.EndTransaction();
}
}
database.CloseDatabase();
return NO_ERROR;
}Also See
AbortTransaction, BeginTransaction, CommitTransactionListen All
Comments (0)

