cursor delete

Ralf Sander ralf at end-if.de
Sat Mar 5 16:48:40 CST 2005


Hi list,

the following sql string executed with kv_nolocks returns a cursor with 
1 record

SELECT RecID,* From CatsRela Where [UniqeIDLeft] = '13' AND 
[UniqeIDRight] = '2'

the cursor is not readonly - as expected
but the record will not be deleted and vc.delete returns no error.



     if vc<>nil then
       if vc.ReadOnly then
		msgbox "read only"
       end

       n=vc.RecordCount
       msgbox "•••record count"+str(n)
       b=vc.FirstRecord
       if not b then
         msgbox "••••••••not first record "
       end
       b=vc.Delete
       if not b then
       	msgbox  "•••error "+str(vdb.ErrNumber) + vdb.ErrString

       end
     end


So what goes wrong?
Maybe I should mention, that the code is executed from another function 
where another cursor on the same table was built to create records 
(recid='0' / kv_readwrite)
but this should not have any affect to the cursor in this function, 
right?

Cheers,
Ralf


More information about the Valentina mailing list