Tips for ADO ProgrammersSetting the ADO Rowset property LockType to adLockPessimistic is not
supported by Oracle Provider for OLE DB. If LockType is set to
adLockPessimistic, OraOLEDB behaves similar to when set as
adLockOptimistic. This behavior occurs because OraOLEDB does not perform
explicit locks on the rows being modified. However, when the new data is
submitted to the database, it only performs the update if the rowset data was not already updated by another user, which means that dirty writes are not allowed.LockType values adLockReadOnly, adLockBatchOptimistic, and
adLockOptimistic are supported by OraOLEDB.Setting ADO Rowset property CursorType to adOpenKeyset or
adOpenDynamic is not supported by Oracle Provider for OLE DB. OraOLEDB
does not support either of the two as Oracle supports Statement Level Read
Consistency, which ensures that the data returned by a query contains only
committed data as of the time the query was executed. CursorType values
adOpenStatic and adOpenForwardOnly are supported by OraOLEDB.

解决方案 »

  1.   

    goodname说话还带回音的~
      

  2.   

    回复人: 21bird(世纪菜鸟:跳出硬盘外,不在内存中) ( ) 信誉:100  2004-03-23 08:37:00  得分:0 
     
     
      当然
      
     
      

  3.   

    回复人: jijuzheng(极品飞车) ( ) 信誉:103  2004-03-23 14:11:00  得分:0 
     
     
      回复人: 21bird(世纪菜鸟:跳出硬盘外,不在内存中) ( ) 信誉:100  2004-03-23 08:37:00  得分:0 
     
     
      当然
      
       
     
      

  4.   

    呵呵.乐观锁与悲观锁.
    读不是问题.
    又看了一下你的贴子.
    你用的SESSION是g_session.
    应该是PUBLIC的吧.
    这个与锁无关.可能与同步读或异步读相关.如果你SESSION
    是同步方式打开的,之前又有一个Rowset打开并没有Release掉
    那么后续操作可能取不出数据.
    这个问题我也没有太多体会,因为我习惯用共用会话时用完一个行集就Release掉了.
    如果操作要锁定的则再打开一个会话.
    唉这个想法纯是被你挤出来的.我可不敢肯定一定是这个原因:)
      

  5.   

    to 楼上:
    据说oracle是行锁,不知道行锁是不是行集锁,好像不是。反正我知道mssql是你说的那样,如果这个rowset不关,别的就不能读他在改的数据。
    不过据说oracle不会,他只会锁定你正在改的当前记录。具体是不是这样我没试过,但愿我没理解错~:)我也知道我的问题和这个好像无关,唉,百思不得其解,
    一样的东西为啥你们都可以我就不行。
      

  6.   

    不知你找到原因没有,我上面说的好象也不对.
    隔离等级使读失败只在ACCESS之类的IASM中才会出现.
    MSSQL,ORCAL等不会有这问题.