I should've disclaimed that the response.writes are only for the sake
of the example. 

I run a statistical analysis site and in order to produce meaningful
tables, I have to format a lot of data beyond the extent to which a
mere SQL statement can provide. On top of that, my database server is
 slow and overburdened as it is, so I'm not very hard pressed to get
into hardcore procedural SQL programming. 

Hence, I find that I have no choice but to walk tables sometimes and
since there are so many ways to do it, I was curious myself as to
which was technically the fastest/most flexible. 

M.

--- In [email protected], "Peter Brunone"
<[EMAIL PROTECTED]> wrote:
> 
>       I'm curious as to why this matters.  With a DataTable, chances
> are that there's a better way to get what you need than by looping
> through the whole table.
> 
> -----Original Message-----
> From: [email protected] On Behalf Of Mat�as Ni�o
> ListMail
> 
>  Which is FASTEST given 'dt' as a datatable to walk
>  
> dim i as int16
> for i = 0 to dt.rows.count -1 
>  response.write(dt.rows(i)("column1"))
>  response.write(dt.rows(i)("column2"))
>  response.write(dt.rows(i)("column3"))
> next
>  
> -OR-
>  
> dim dr as datarow
> for each dr in dt
>  response.write(dr("column1"))
>  response.write(dr("column2"))
>  response.write(dr("column3"))
> next 
> 
> -OR-
> 
> Dim dv as dataview = dt.defaultview
> for i = 0 to dv.count
>  response.write(dv(i)("column1"))
>  response.write(dv(i)("column2"))
>  response.write(dv(i)("column3"))
> next
>  
> Taking all possible things into account, which is always best to use? 
> 
> Thanks in advance for anyone who cares to bite...
> 
> Mat�as
> Manassas, VA




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to