[Gambas-user] Return values for gb.db Results

Rich Falconburg wrichf at ...159...
Wed Mar 17 18:34:38 CET 2004


On Wednesday 17 March 2004 4:24 am, Fabien Bodard wrote:
> Le Mercredi 17 Mars 2004 07:49, Rich Falconburg a écrit :
> > Ok.  It says that MoveNext and MovePrevious will return TRUE if there's
> > no next record.  How does one go about testing for this?  I get type
> > mismatch when testing the boolean condition as in:
> >
> >  bRC = rResult.MoveNext
> >
> >   It says "got function instead".  Am I oversimplifying the test here? 
> > I'm sure I must be doing something wrong.  Any help would be appreciated.
> >
> >  I've not done BASIC stuff in a long time but it's amazing how fast it
> > comes back to you.  Already got a decent database frontend working but
> > this little piece is creating some headaches.
> >
> > Thanks!
>
>  bRC = rResult.MoveNext() ... just add '()'
>
> Fabien
>

  Thanks.  As I said, I'm a bit rusty.  Should have caught that one.  BTW, 
shouldn't this work with WHILE as in

  WHILE rResult.MoveNext()

  IF is just fine but using WHILE it stops after moving one record and I don't 
think it should.  The condition remains True so it should work.  Just 
curious.

Rich

-- 
Rich Falconburg
wrichf at ...159...





More information about the User mailing list