dataset & vb.net & row order

Posted on 2004-04-06
Medium Priority
Last Modified: 2007-12-19
I have a dataset.  One of the columns is "DIRECTORPositionheld".  I need to move the row where DIRECTORPositionheld = "President" to the top of this dataset, before I bind it to a datalist object.
Question by:dbyrne03
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 10

Expert Comment

ID: 10769542
you have to refill the datatable of the dataset with "order by DIRECTORPositionheld". you have to requery the database if is that what you want to know

Author Comment

ID: 10769767
right now the sql that I'm using to fill the dataset is :
If I use :
it will put the accountant above the director above the  president above the treasurer .  What sql would I use to place the president at the top?
LVL 10

Accepted Solution

EBatista earned 300 total points
ID: 10771322
there is not sql sentece avaible to do what you want, you are forced to use some kind of trick, you could add a column to the database table that express the category and the values could be numbers or letters:
DIRECTORPositionheld    Category
accountant                          4
director                              2
president                            1

then set the order by to that category column  


Author Comment

ID: 10771941

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question