Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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 Access's SQL view of a query that does exactly what we want it to do (the only difference between our code and Access's 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!

Posted

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.

.nerd
Posted

I had a similair problem once..it KILLED me for many many moons..

 

then i did a

 

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

 

and everything magically ordered correctly...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...