November 12th, 2007, 12:11 AM
DataAdapter.Fill(Dataset) is slow
I am using ASP.NET 2.0 + C#, we need to retreive the data from DB2 database located in US. We are using ODBC driver to connect to the db2.
As there was problem with the query we are going for dataview in our code using a single query to retreive all the data from the table. But to fill the dataset with 3000 rows its taking around 10 seconds.We need to display the required data in a gridview.
I used the following piece of code
OdbcCommand ocmdDPSR = new OdbcCommand(query, oconnDPSR);
OdbcDataAdapter odpDPSR = new OdbcDataAdapter(ocmdDPSR);
Can anyone suggest me how to reduce this time of filling so that the report can be generated within 5 seconds.
Thanks in advance
November 12th, 2007, 08:51 PM
Re: DataAdapter.Fill(Dataset) is slow
What is the actual Query? Maybe it can return less records? Users rarely like to scroll thru 3000 records.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.