[V4RB2] ORDER BY ?

Robert Brenstein rjb at robelko.com
Mon Apr 11 23:42:53 CDT 2005


>  >
>>  Safer or standard, maybe...
>>  But the returned cursor will be bigger, generating more
>>  network trafic, since you'll get fields that you won't use.
>>  For some queries, this will not be an issue, for others, that
>>  may slow down performances, don't you think?
>>
>>  Eric
>>
>
>I tend to agree with Eric on this one.  The ability he describes is
>available in both MS Access and SQL Server.  I have used this so much, I
>actually thought it was part of the SQL standard.  Where this can become
>extremely valuable is when binding to multi-column listboxes and
>grid-type controls.  If the cursor only returns the columns you are
>interested in displaying, you can very quickly and easily get the
>listbox/grid filled in.  When you have to start paying attention to
>additional columns required to sort the cursor, you now have more code
>necessary to filter out those unwanted columns.
>
>This doesn't really affect me at the moment because my current project
>is using the API way almost exclusively, but I can definitely see where
>Eric is coming.  Eric, I think one of us should at least put this in
>Mantis as a feature request.
>
>Take care,
>
>-John

I did not mean that I consider having to include them is better. On 
the contrary, I usually want to sort on fields that I do not need in 
the cursor. Even without the network performance issues, it just 
makes the code bigger by having to fudge these out. So I am on that 
with you guys. However, I have been bitten a few times by 
malfunctioning SQL in V1 and including sort fields in select fixed 
that, hence my reply to the original poster. It surely would be nice 
to have this cleaned one way or the other.

Robert


More information about the Valentina mailing list