DataTable question
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: DataTable question

  1. #1
    Join Date
    Mar 2014
    Posts
    2

    Question DataTable question

    I have a datatable that correctly populates from a SQL query, but I want to do a couple things with the datatable itself. First I want to only grab the rows that have a date of today or previous in the column "ECompletion", then I want to sort those by oldest date and finally push the results in order to lbl_urgentTasks.Text.

    {
    dtTasks = getDataTable("SELECT * FROM Tasks WHERE IsActive = 1");

    \\NEW CODE HERE
    }

    Anyone know where I can start with this? I have searched online and didn't really find an answer. I have good experience with c# and the .net framework so don't be afraid to go crazy!

  2. #2
    Join Date
    Mar 2014
    Posts
    2

    Re: DataTable question

    Okay so to start with, I sorted the dt using a modified SQL query "SELECT * FROM Tasks WHERE IsActive = 1 ORDER BY ECompletion ASC". This gives me all active tasks ordered by earliest date.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center