Results 1 to 4 of 4

Thread: Sort Values from TextBoxes

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2007

    Sort Values from TextBoxes

    On my form i have arranged 8 textboxes as an table with two columns and 4 rows. First columns corresponds to the field Quantity and second column corresponds to Rate.

    It is required to save the values in the database in the descending order of the quantity with their corresponding rates.

    Plz suggest me a way to sort the values.


  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    Re: Sort Values from TextBoxes

    Create a DataTable with appropriate columns. Add a row for each pair of values. Set the Sort property of the DefaultView to sort by the desired column. Call ToTable on the DefaultView to create a new DataTaboe in the desired order. Use a data adapter to save the data from the second DataTable to the database.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002

    Re: Sort Values from TextBoxes

    What database design requires the data be stored in some kind of sorted order? That's the purpose of the query when extracting the data from the DB. You shouldn't be caring how the data is stored, because it won't materially impact retrieval in any way.
    My usual boring signature: Nothing

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002

    Re: Sort Values from TextBoxes

    Quote Originally Posted by Shaggy Hiker View Post
    What database design requires the data be stored in some kind of sorted order?
    Probably the homework kind...

    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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


Click Here to Expand Forum to Full Width