Problems with V4RB have me beat.

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Aug 23 13:41:57 CDT 2004


On 8/10/04 10:35 AM, "Barney" <barney at custombased.com> wrote:

> seemed the only way I could get the cursor to work for me
> as seems to be apparent again this time.
> 
> Does 2,1,2 OR kV_Server, kNoLock, kRandom
> work properly for you ?

Hi Barney,

I have found source of problem.
When I modify your code as next:

  Dim Pcur as VCursor
  Dim Err as boolean
  Dim S as string
  dim iErr as Integer
  
  S = Listbox1.cell(listbox1.listindex, 0)
  
  Pcur = App.DB.SQLSelect(
    "Select * from componants where componant = '" + S + "'", 2,3,2)
                                                            ^^^^^^^^^^^^

  iErr = App.DB.ErrNumber   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

  
  If Pcur <> Nil and Pcur.RecordCount > 0 then
    Err = Pcur.deleteAll()
  End if
  
  App.Db.Flush
  pcur = nil



I have to see that cursor cannot be created!
Error 363.

Records which you try delete are LOCKED!
In debugger I see that they are locked with READ LOCK.

You see now why Valentina refuse delete that records?

So you need find in your code place where you BEFORE THAT create cursor with
READ LOCK.

----------------
TIP 4: 

* you must use noLock in the whole project or not use at all!
    or you must in EACH and EACH call SqlSelect() specify NoLock.
    or you must in each call use READ or WRITE locks.

DO NOT mix them. Otherwise traps.


-------------
I still want check why one record of selection still was deleted.
Probably it was not locked.



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