Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Datalist: limit the iterations

Reply
Thread Tools

Datalist: limit the iterations

 
 
SparvHok
Guest
Posts: n/a
 
      11-23-2004
Hi there.

Just wondering if there is some way to make the Datalist webcontrol,
only iterate a prespecified number of times?

Like setting a property (MaxRows perhaps!?).


--

+================================================= =====================+
| SparrowHawk The Magician |
| |
| |
| |
| |
+================================================= =====================+
| e-mail: sparvhok[NOSPAM]hotmail.com |
+================================================= =====================+
To send me an email, replace the [NOSPAM] tag with @ sign.
 
Reply With Quote
 
 
 
 
Scott Mitchell [MVP]
Guest
Posts: n/a
 
      11-23-2004
The easiest way is to just limit the data coming back from the database.
You could use the TOP keyword to limit the results returned. For
example, to return 10 records use:

SELECT TOP 10 *
FROM TableName

hth

--

Scott Mitchell
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 
Reply With Quote
 
 
 
 
SparvHok
Guest
Posts: n/a
 
      11-23-2004
Scott Mitchell [MVP] wrote:
> The easiest way is to just limit the data coming back from the database.
> You could use the TOP keyword to limit the results returned. For
> example, to return 10 records use:
>
> SELECT TOP 10 *
> FROM TableName
>
> hth
>

Yes, I know. And that is probably the most sane thing to do, since you
dont want to extract more than neccesary from the DB. One shouldnt hog
the database connection more than nec...

ok, thanx for the answer.

--

+================================================= =====================+
| SparrowHawk The Magician |
| |
| |
| |
| |
+================================================= =====================+
| e-mail: sparvhok[NOSPAM]hotmail.com |
+================================================= =====================+
To send me an email, replace the [NOSPAM] tag with @ sign.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting nested loop iterations Derek Basch Python 18 03-17-2006 09:21 PM
xslt challenging situation related to iterations hilz XML 5 02-16-2006 01:20 AM
Counting iterations Derek Basch Python 11 04-11-2005 08:05 PM
Struts iterations Gordon Macleod Java 0 07-21-2003 08:28 PM
Do something every x iterations Infiniti XML 6 07-08-2003 01:06 PM



Advertisments