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)