使用Kompex事务功能

来源:互联网 发布:淘宝卖什么最好 编辑:程序博客网 时间:2024/06/03 18:16

Kompex::SQLiteDatabase *m_pDatabase; 
Kompex::SQLiteStatement *m_pStmt;


m_pDatabase = new Kompex::SQLiteDatabase(strDBPath);

m_pStmt = new Kompex::SQLiteStatement(m_pDatabase);


        //开启事务

m_pStmt->BeginTransaction();

m_pStmt->CommitTransaction();

       //提交事务


      事务的目的是保证操作的原子性。

0 0
原创粉丝点击