Slow dataset initiallization problem

  • Thread starter Thread starter kevin
  • Start date Start date
K

kevin

hi all

I have a dataset generated by an oleDbDataAdapter, there are about 20
columns in the dataset, but it seems like it takes a long time to initialize
the dataset, e.g. if I
fill the dataset on a button click, it will take 2 to 3 seconds to return
the first fetch, but all clicks onward will be fast.
does anyone else experience this problema?


Kevin
 
Hi Kenvin,

Do you invoke Fill with already opened connection?
If not, Fill opens connection for you which might take few seconds.
If this is the case, the behaviour is normal. Once connection is open it
will stay open in the conneciton pool thus subsequent invocations will don't
have time penality.
 
I have try opening the connection before calling the fill method, it doesn't
make any difference. it's not the fill method, it's the dataset
initialization.
 
Hi kevin,

Is it empty at the beginning? Or is it created at design time?
 
Check out output window of VS.NET when Fill is invoked - if there is
activity if form of loading assemblies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top