[Gambas-user] MULTIPLE ROW RESULT

Nx GT-R BOY nxgtrturbo at ...626...
Tue Jan 22 17:16:28 CET 2008


MULTIPLE ROW RESULT

Hi, I got a trouble with the "Result" data type @ gambas, I have a function
like this:

PUBLIC myresult AS Result

PUBLIC SUB tellmeposition(lookingfor AS String, table AS String, reference
AS String, value AS String)
myresult = conexion.Exec("SELECT count(*) AS position FROM " & table & "
where " & lookingfor & " < (SELECT " & lookingfor & " FROM " & table & "
where " & reference & " = '" & value & "')")
END

Everything works perfect when the query returns ONLY ONE ROW, but what about
multiple row result?, I tried:

PUBLIC myresult AS Result[X]
and
PUBLIC myresult[X] AS Result

But that didn't work (the language doesn't allow that), Is there any
possible way to catch all the rows?

My program crash with the message:
"Query failed: Subquery return more than 1 row"

Did I make something wrong?


-- 
http://www.cardomain.com/ride/645756
http://nxgtrturbo.googlepages.com/
http://www.fotolog.com/nxgtrturbo/
http://tallerhuertas.googlepages.com/



More information about the User mailing list