Access是否支持事务处理,如果不能那VC++中有关事务处理的函数就不能用了???

解决方案 »

  1.   

    当然支持
    CDaoWorkspace::CommitTrans
    void CommitTrans( );
    throw( CDaoException, CMemoryException );ResCall this member function to commit a transaction — save a group of edits and updates to one or more databases in the workspace. A transaction consists of a series of changes to the database’s data or its structure, beginning with a call to BeginTrans. When you complete the transaction, either commit it or roll it back (cancel the changes) with Rollback. By default, without transactions, updates to records are committed immediately. Calling BeginTrans causes commitment of updates to be delayed until you call CommitTrans. 
      

  2.   

    GOOD QUESTION!!
    Access确实支持transaction,但在MTS中并未使用它,而且不提倡使用它,MTS是通过Access的OLE DB Provider实现自已的transaction的。jiangsheng(蒋晟)所提的,是DAO提供的transaction,当然OLE DB Provider内部很可能是通过DAO(MS JET)实现transaction的。
      

  3.   

    只要数据库有OLE DB Provider,MTS就能OLE DB Provider通过实现transaction
      

  4.   

    换句话说,只要你通过ADO访问数据库,因为ADO内部用OLE DB Provider,所以MTS就能借助OLE DB Provider提供Transaction