[ RB4] To test a cursor ?

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Oct 24 08:53:27 CDT 2003


on 10/24/03 7:14, Thierry Nauze at huancaya at wanadoo.fr wrote:

> Which is the best solution ?
> 
> cur=Base. SQLSELECT ( ... )
> 
> Which should the best test be made:
> 
> FIRST
> if  cur.recordCount < > then
> ...
> else
> msgBox " Empty "
> end
> 
> SECOND
> If  cur < > NIL then
> if cur.recordCount < > then
> ...
> else
> msgBox " Empty "
> end
> else
> msgBox "NIL"
> end
> 
> LAST
> if cur < >NIL then
> ...
> else
> msgBox "NIL"
> end
> 
> 
> 
> Before the first worked fine . Not now: Often / always (?) has ' the
> Nile Obbject Exception ' returned
> 
> Is second model necessary or the third is it sufficient?
> In other words, if a cursor  is not 'NIL', cursor.recordCount is not
> equal zero or can be equal zero ?

Hi Thierry,

In fact after cursor build you should check Error code at first.
You can get the batch of errors: e.g. Table Not Found
In this case you do not have good cursor

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