V4RB 1.1 RB 5.5 cursors

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jun 14 13:51:11 CDT 2004


On 6/14/04 1:26 PM, "olivier vidal" <vidal_olivier at yahoo.fr> wrote:

>> 
>> I think 2 ways
>> 
>> 1) curs = db.SqlSelect()
>> 
>> Now you must check if cursor is not nil
>> 
>>     if( curs <> nil )
>>         then you use it
>> 
>> 
>> 2) also you can and should check error code after SqlSelect()
>> 
> 
> Ah, I understand  now!
> 
> It is necessary to use cursor=database.sqlselect () !
> 
> To use a cursor, I always use a constructor to obtain a subclass of
> Vcursor (for triggers....).

> And I already test if curs < > nil and verified the errors + realbasic
> NilObjectException. But from the construction of the cursor, if there
> was an error (wrong sql string, lock cursor....), my app crashed
> immediately.
> Why?

Aha, it crashes in constructor of cursor.

Answer is:
    99.99% of V4RB developers use SqlSelect() way.

    I think that constructor-way is broken now,
    after we have add record locks.


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