[Gambas-user] database eof and bof

nigel at ...38... nigel at ...38...
Mon Mar 7 17:37:48 CET 2005


Neil,
Please publish your code so that we can look into the problem you mention with 'Available'.  My usage of:
hResult = $hConn.Exec("select * from table")
hResult.MoveLast()
hResult.moveNext()
IF hResult.Available THEN
    PRINT "Record Available"
ELSE
    PRINT "Not available"
ENDIF

....gives me "Not Available"

Regards
Nigel
> Message date : Mar 06 2005, 02:11 PM
> From : "Neil Fallon" 
> To : gambas-user at lists.sourceforge.net
> Copy to : 
> Subject : Re: [Gambas-user] database eof and bof
> On Sun, 2005-03-06 at 01:45 -0500, Rob wrote:
> > On Sunday 06 March 2005 01:31, Neil Fallon wrote:
> > > I am at the whims of the users moving forward and backward. The
> > > easier way for me may be to just check the first and last records
> > > in the database. My key field is an auto increment number. I can
> > > just check if the value is 1 for the first record or what ever the
> > > number is for the last record value in the database.
> > 
> > I guess that's cool as long as you're sure there'll never be holes in 
> > the database, but I personally would check r.Available regardless to 
> > avoid the possibility of a runtime error.
> > 
> > Rob
> > 
> Hi Rob,
> 
> When I check Available on the last record I get an error stating there
> are no more records. I don't want the message transmitted to the user.
> 
> Neil
> 
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20050307/08d57b8a/attachment.html>


More information about the User mailing list