[Gambas-user] Empty Result in Gambas
richard terry
rterry at ...1822...
Mon Feb 18 03:27:03 CET 2008
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