#619

Ruslan Zasukhin sunshine at public.kherson.ua
Mon May 9 11:31:57 CDT 2005


On 5/9/05 7:21 AM, "Claudius Sailer" <Claudius at sailer-online.de> wrote:

Hi Claudius,

> Hello Again :-))
> 
> I believe I found problem of #619. I didn't set Cursor=NIL before I
> reuse it for new SQLSelect. Could you please verify that?

Please tell me again,

So you have not delete cursor and what happens:
    - next cursor cause crash?
    - or some error ?
    - or ... ?

Expected behavior is error as:
    cursor cannot be built because record(s) are locked


> Problem for me is now, why I have only problem with thos SQL, is it
> possible because it is at the moment biggest SQL-Result. Do I really
> need all the time to set Cursor to NIL?

YES. 

It is VERY VERY recommended kill cursors as only as you do not need them.
Because cursors may eat a lots of resources in RAM and disk,
And the main they lock records.


> When you say now YES I will have a lot of work to set all cursors to
> NIL in my coding.

Note, if you create cursor inside of function, then on exit of function
cursor will be deleted automatically by REALbasic.

    func foo()
        dim curs as VCursor
    
        curs = db.SqlSelect()

        // work

        curs = nil  // optional
    end

But if you create several cursors inside of single function,
Or if you keep pointer to cursor in some class or global variables then keep
your eye.
 
> Thanks for help
> 
> 
> Claudius

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list