SQL ORDER BY isn't ORDERING by anything

msellery

Member
Joined
Mar 19, 2003
Messages
17
We have a SQL expression that works perfectly except it is not ordering by anything. Here is our code:

SELECT Trade.symbol, Trade.lastTrade FROM Trade WHERE (((Trade.symbol)=FSIIX)) ORDER BY Trade.lastTrade DESC;

We took that directly from Accesss SQL view of a query that does exactly what we want it to do (the only difference between our code and Accesss is replacing the " with for use in VB.net) but we want to use this query from a vb .net application. It returns data just fine, but the data is not sorted. Any suggestions? Thanks!
 
I am surprised. It should work.

Howver, just to be sure, if your returned object is a datatable, you may check out the Datatables .Select method. If I recall correctly, you can submit a "sort" string there, too.
 
I had a similair problem once..it KILLED me for many many moons..

then i did a

Code:
dataadapter.fillschema(datatable, schematype.mapped) 
or schematype.source
dataadapter.fill(datatable)

and everything magically ordered correctly...
 
Back
Top