progress bar while calling SqlDataAdapter.fill

  • Thread starter Thread starter Guest
  • Start date Start date
Yup, see RowChanging and RowChanged events.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

chris said:
Can i show the progress of a SqlDataAdapter1.Update(m_ds, "XLData")
statment?
 
I doubt you can directly .. let me address fill rather than update at this
point since the answers will be mostly similar.

You could use the overload

public int Fill(DataSet, int, int, string);
Adds or refreshes rows in a specified range in the DataSet to match those in
the data source using the DataSet, DataTable, and IDataReader names.

and be able to show the progressbar at the cost of performance.

Or, you could use one of the virtuals accepting a datareader and use those
to give this func. But really your database access layer ideally should be
far far away from the UI. And if you need to show a progressbar, can you
imagine how heavy is the object you are filling?

- Sahil Malik
Independent Consultant
You can reach me thru my blog - http://dotnetjunkies.com/WebLog/sahilmalik/



chris said:
Can i show the progress of a SqlDataAdapter1.Update(m_ds, "XLData")
statment?
 
Like Kyle would say - I've learnt something today. :) .. man that is amazing
though.

- Sahil Malik
Independent Consultant
You can reach me thru my blog - http://dotnetjunkies.com/WebLog/sahilmalik/



Miha Markic said:
Yup, see RowChanging and RowChanged events.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

chris said:
Can i show the progress of a SqlDataAdapter1.Update(m_ds, "XLData")
statment?
 
Sorry, I've made a typo.
William is right, RowUpdated and RowUpdating are the correct ones :-).

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Miha Markic said:
Yup, see RowChanging and RowChanged events.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

chris said:
Can i show the progress of a SqlDataAdapter1.Update(m_ds, "XLData")
statment?
 
So does the return value "i = daAdapter.fill" come before all the updates?

For example, will you know how many times OnRowUpdating and OnRowUpdated
will be called before that process starts?
 
Back
Top