Re: Returning records from a Store Procedure
From: Roger (Roger_at_discussions.microsoft.com)
Date: 10/13/04
- Next message: Jochen Jansen: "Data add"
- Previous message: Duncan: "Re: Posting Data in an Access Database stored on a web server"
- In reply to: Jerry Pisk: "Re: Returning records from a Store Procedure"
- Next in thread: William \(Bill\) Vaughn: "Re: Returning records from a Store Procedure"
- Reply: William \(Bill\) Vaughn: "Re: Returning records from a Store Procedure"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 06:11:06 -0700
It is being assigned to a datareader. The statement goes as:
CommandObj.Commandtext = "Stored Procedure Name"
DatareaderObj = CommandObj.ExecuteReader
while DatareaderObj.Read
... loading data into grid
end while
Runs decently when the Stored procedure returns a small data set. But, the
dataset can get as large as 35,863. That takes 10 minutes to finish loading.
If I was just using a simple select statement and use the dataadapter object
to fill the datatable and the associate the datatable to the grid's
datasource property, it runs in like 30 seconds.
reason why I am using a stored procedure is because I am avoiding writing
one big query that will have like 8 to 10 table joins and 3 of them will be
outer joins.
The stored procedure runs quick. It slows down with it gets to the while loop.
We cannot be the only company that has written a stored procedure that
returns thousands of records. Is there any other way to handle this. Thanks.
"Jerry Pisk" wrote:
> Are you using DataReader or DataAdapter? DataReader is the fastest ADO.Net
> object to get data out of a database, but if you're loading it to a grid it
> probably doesn't make much difference as the grid itself will be pretty slow
> (since it has to hold all data in memory).
>
> Jerry
>
> "Roger" <Roger@discussions.microsoft.com> wrote in message
> news:9922CF60-1774-4239-B144-E70B5CFAD037@microsoft.com...
> > Is there any other way to load data returned from a stored procedure other
> > then using a Data Reader.
> > I am loading the data returned into a data grid. It works fine if the
> > amount
> > of records returned is small, but sometimes it will return several
> > thousand
> > records.
> >
> > And to load the data grid using the data reader, slows the program down
> > drastically. Any suggestions.
> >
> > I tried using views and I could still use the data adapter to fill the
> > data.
> > It runs okay for certain situations.
> >
> > Thanks.
> >
> >
>
>
>
- Next message: Jochen Jansen: "Data add"
- Previous message: Duncan: "Re: Posting Data in an Access Database stored on a web server"
- In reply to: Jerry Pisk: "Re: Returning records from a Store Procedure"
- Next in thread: William \(Bill\) Vaughn: "Re: Returning records from a Store Procedure"
- Reply: William \(Bill\) Vaughn: "Re: Returning records from a Store Procedure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|