Jon, please correct this

jda jda at his.com
Thu Jul 22 08:49:00 CDT 2004


>In the blue color above you see that when you have create one cursor the
>previous start to die.
>
>I am sure that you have code BY LOGIC as next
>
>     curs = db.SqlSelect()
>     ...
>
>     curs = db.SqlSelect()
>
>
>This is correct code from point of view of REALbasic, but this is not very
>good from point of view Valentina, and more correctly say:
>         functions that allocates/lock/eat resources
>
>The first cursor LOCK records, so may happens that you simply will not be
>able create second cursor because it also will want the same records.

But the second cursor is a selection from a different table, so it 
can't select the same records. I thought it wouldn't matter if I 
didn't nil out the first reference and it would be closed by RB. But 
I'll nil it out myself, as you suggest.

Done.

>
>
>Also I think in your code you keep Cursor variable as Window property or may
>be application class property. And you have forget to NIL it before you
>close db.  This cause now new crash in 2.0 which I will fix now. Although it
>still good idea destroy all objects before db.close().

OK.

>
>And I will try to add feature that V4RB will write into log WARNING in case
>it find object destroyed AFTER db.close().
>
>In any case fix above issue with cursors and send me new project.
>

I'll send it in a few minutes.

Jon


More information about the Valentina-beta mailing list