IOT and Optimistic Locks 
Author Message
 IOT and Optimistic Locks

I just ran into a problem using an index organized table and optimistic
locking.  If you try to open a recordset with an optimistic lock, you get
the error "data type is not supported".  Is there a known limitation using
optimistic locks and index organized tables?  Any insight is appreciated

W2k pro sp3
Oracle 8.1.7 client and server
ADO version 2.6 sp2
Provider=MSDAORA
VB6 SP3

To reproduce:

create table IOT_TEST
(
  col1      VARCHAR2(15) CONSTRAINT nn_IOT_TEST1 not null,
  col2   VARCHAR2( 6) CONSTRAINT nn_IOT_TEST2 not null,
  col3          VARCHAR2(15) CONSTRAINT nn_IOT_TEST3 not null,
  col4      VARCHAR2( 15) CONSTRAINT nn_IOT_TEST4 not null,
  CONSTRAINT pk_IOT_TEST PRIMARY KEY (col1,col2,col3,col4 )
)
 ORGANIZATION INDEX TABLESPACE ****valid tbl space****;

commit;

insert into iot_test values('a','a','a','a');
insert into iot_test values('b','b','b','b');
insert into iot_test values('c','c','c','c');
insert into iot_test values('d','d','d','d');
commit;

Here is some quick AND DIRTY code.  (replace the ConnectString.)

Dim oRS As New Recordset

oRS.CursorLocation = adUseClient
Call oRS.Open("select * from IOT_TEST", ConnectString, adOpenDynamic,
adLockOptimistic)
oRS.MoveLast
MsgBox CStr(oRS.AbsolutePosition) & " records returned"

**********************

This will work just fine: (adReadOnly)
Call oRS.Open("select * from IOT_TEST", ConnectString, adOpenDynamic,
adLockReadOnly)



Sun, 06 Mar 2005 03:25:33 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Add a new item also locked with optimistic locking

2. Optimistic Lock: No Error Adding New Record

3. Optimistic Locking and Write Conflict Errors

4. Optimistic Locking in VB with Stored procedures

5. Optimistic Record locking (networked Database)

6. Re : Error 3186 on Optimistic Locking

7. Error 3186 on Optimistic Locking

8. Dynamic cursor + Optimistic batch locking

9. Help needed : ServerSide Cursor and Optimistic Locking

10. Forcing update after multi-user conflict with optimistic locking

11. Timestamp datatype and VB - optimistic lock

12. Optimistic Batch Updates

 

 
Powered by phpBB® Forum Software