Results 1 to 3 of 3

Thread: Simple Datalist Question

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2003
    Posts
    53

    Simple Datalist Question

    I have fallen in love with the datalist control in .Net... but now its testing my patience. In all the other times I have used it, I have had a small database that I didn't particularly care if it listed the entire database.

    This time is different. I want to take the last five entries in my table (using an automnumber ID field as primary key) and bind them toa datalist.

    What code am I needing to limit the datalist to only 5 entries instead of the entire table of data?

    HWOODKY

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    post your code. It may be as simple as modifying a sql statement.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Location
    Earth
    Posts
    23
    Use store procedures,
    SELECT TOP 5

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