[Gambas-user] Empty Result in Gambas

Charlie Reinl Karl.Reinl at ...9...
Mon Feb 18 09:13:45 CET 2008


Salut,
	
I know from gambas1, does that work anymore ? 

    rTest = ThisConn.Handle.Exec(sSQL)
    IF rTest.Available THEN

Amicalment
Charlie


Am Montag, den 18.02.2008, 13:27 +1100 schrieb richard terry:
> On Mon, 18 Feb 2008 11:23:15 am Nx GT-R BOY wrote:
> >  Hi, I have a little problem with the Result data-type in gambas.
> >
> > I don't know how to know when the result is empty, something like this:
> >
> > myresult = conexion.Exec("select name from table where id = '5'")
> 
> Try this:
> 
> If myresult.count then
> 	do whatever
> else
> 	print  " nothing in my result set"
> end if
> 
> regards
> 
> Richard
> 
> >
> > If theres an id=5 everything goes perfect, since I know that because
> > myresult!name gives me something, but what when nothing was found, I tried:
> >
> > If myresult!name = NULL then
> > Message.info("Not found")
> > end if
> >
> > But that didn't work, so, whats the way to do it?
> >
> > Thanks in advance.






More information about the User mailing list