> The follwing code works > > hResult = $hConn.Find("addresses", , "ORDER BY lastname") > > but result is not sorted. Of course I could use .EXEC with full SQL string > but.... >
The request is only in the second argument of Find() (see documentation). The other arguments are substituted inside the request, a bit like the Subst() function. You must put your "ORDER BY" inside the second argument. But as Find() internally adds "WHERE" to the query beginning by default, you must write it like that: hResult = $hConn.Find("addresses", "WHERE True ORDER BY lastname") Maybe Find() should be more clever, and detect ORDER BY too. I will implement that for Gambas 3. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user