OleDbDataAdapter Partial Fill

  • Thread starter Thread starter H. Williams
  • Start date Start date
H

H. Williams

I'm using a OleDbDataAdapter to partially fill a dataset:

Overloads Public Function Fill(DataSet, Integer, Integer, String) As Integer

Everything works, but the function only return the records filled. Is there
any way to get the total record count, without another command?
 
The fill function below returns the total records filled. However, it is my
understanding that function first pulls all the records returned by the SQL
statement before filling the records you specify in the passed integers. Is
there any way to override the fill function so you could also return the
total records returned in addition to the total records filled?

Miha Markic said:
Hi,

Which total are you talking about?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

H. Williams said:
I'm using a OleDbDataAdapter to partially fill a dataset:

Overloads Public Function Fill(DataSet, Integer, Integer, String) As
Integer

Everything works, but the function only return the records filled. Is
there any way to get the total record count, without another command?
 
Hi,

Actually it pulls all records before the start index and ignores the records
after the end limit.
IOW there isn't a way. You might consider a stored procedure instead.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

H. Williams said:
The fill function below returns the total records filled. However, it is
my understanding that function first pulls all the records returned by the
SQL statement before filling the records you specify in the passed
integers. Is there any way to override the fill function so you could
also return the total records returned in addition to the total records
filled?

Miha Markic said:
Hi,

Which total are you talking about?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

H. Williams said:
I'm using a OleDbDataAdapter to partially fill a dataset:

Overloads Public Function Fill(DataSet, Integer, Integer, String) As
Integer

Everything works, but the function only return the records filled. Is
there any way to get the total record count, without another command?
 
Back
Top