cursor delete

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Mar 5 21:41:12 CST 2005


On 3/5/05 5:48 PM, "Ralf Sander" <ralf at end-if.de> wrote:

> 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?

No, it will.

Because THAT SECOND USER have lock record.
And he NOT expect to see that record have magically gone away

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list