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.
 
Check out output window of VS.NET when Fill is invoked - if there is
activity if form of loading assemblies.
 
Back
Top