R
Robb Smith
I am using a SqlDataAdapter to retrieve a DataSet from the database. When I
Trace the creation of the SqlDataAdapter object, it is taking more time than
it does to retrieve the DataSet! Here's my code:
Dim da As New SqlDataAdapter(sSQL, cn)
Dim ds As DataSet = da.Fill
where sSQL is the SQL statement and cn is the connection. On a client
machine that is running EXTREMELY poorly, I have a large query that returns
33,000 records in 1.7s (second line). However, it takes 1.9s just to create
the data adapter (first line)! (Times on my development and test machines
are fractions of a second.)
What is the data adapter doing to take so long? Even on my machine it
shouldn't take more time to simply create an object as it does to read the
data. Are there options I can turn "off" for the data adapter? Is there
another (simple) way to pull from the database into a DataSet? I'm already
using my own code to do updates to the database because I don't like the
commands generated by the data adapter -- I should be able to do the same
for reading data.
Robb
Trace the creation of the SqlDataAdapter object, it is taking more time than
it does to retrieve the DataSet! Here's my code:
Dim da As New SqlDataAdapter(sSQL, cn)
Dim ds As DataSet = da.Fill
where sSQL is the SQL statement and cn is the connection. On a client
machine that is running EXTREMELY poorly, I have a large query that returns
33,000 records in 1.7s (second line). However, it takes 1.9s just to create
the data adapter (first line)! (Times on my development and test machines
are fractions of a second.)
What is the data adapter doing to take so long? Even on my machine it
shouldn't take more time to simply create an object as it does to read the
data. Are there options I can turn "off" for the data adapter? Is there
another (simple) way to pull from the database into a DataSet? I'm already
using my own code to do updates to the database because I don't like the
commands generated by the data adapter -- I should be able to do the same
for reading data.
Robb