CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Nov 2007
    Posts
    1

    DataAdapter.Fill(Dataset) is slow

    Hi

    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

    oconnDPSR.Open();
    OdbcCommand ocmdDPSR = new OdbcCommand(query, oconnDPSR);

    OdbcDataAdapter odpDPSR = new OdbcDataAdapter(ocmdDPSR);

    odpDPSR.Fill(dsDPSR);

    oconnDPSR.Close();

    Can anyone suggest me how to reduce this time of filling so that the report can be generated within 5 seconds.


    Thanks in advance
    Malathi

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    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.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured