Wich one is better? Data Binding or Looping a SQL query? Need opinion

May 12 2010 9:36 AM
Hi everyone.

This software gives you a table's report. tha data is shown in a grid view. But the way this grid view is this:
1. Send the query string to the database with a SQL connection class.
2. Then we loop row by row. In each loop we use the datagridview add to show the database row in the screen.

Also you can select wich columns you want to see. And people select all columns (there are like 50 columns). And the query is send like this

SELECT col1, col2, ....,col49, col50 FROM table

instead of

SELECT * FROM table

But the rows the query gives are like greater than 100 or 200. And somwtimes it takes like 20 seconds to giveme the anwser

So the question is... is would be faster if a use the grid data binding propierties? Need your opinion, tutorials, articles, books whatever

Answers (1)