468,532 Members | 1,762 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,532 developers. It's quick & easy.

Refresh BindingSource .net 2005

I have a Windows app I am developing in VS .NET 2005 that is required to
periodically look at the data in a table in an MS SQL 2000 database.

The data is being changed from an external stored procedure. All I want
the app to do is refresh the data bound controls on a timer tick.

I am using the new TableAdapter and BindingSource controls as
recommended in the Help. I am at a loss as to the method to use to get
the BindingSource to do another data fetch.

Thank you for your help in this matter.

Bryan Shaw
bs***@amerexenergy.com
Jan 10 '06 #1
2 6174
Bryan,

The BindingSource can't trigger another fetch. What you have to do is
set the DataSource property to a new version of the table. However, this
will most likely cause the current position and whatnot to change.

You are better off updating the bound table with the changes from the
database (by cycling through the table and adding/deleting/editing the
records where appropriate).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bryan Shaw" <bs***@amerexenergy.dontspamme.com> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
I have a Windows app I am developing in VS .NET 2005 that is required to
periodically look at the data in a table in an MS SQL 2000 database.

The data is being changed from an external stored procedure. All I want
the app to do is refresh the data bound controls on a timer tick.

I am using the new TableAdapter and BindingSource controls as recommended
in the Help. I am at a loss as to the method to use to get the
BindingSource to do another data fetch.

Thank you for your help in this matter.

Bryan Shaw
bs***@amerexenergy.com

Jan 10 '06 #2
Thanks, Nicholas. I am not sure what you are saying. Let me try to
describe my scenario in more detail.

User open my windows app. There are three bound controls to the table
called tciBatchLog. BatchKey, DealNum and InvNum are the three bound
columns. The data at that time is 123, 25 and 1 perspectively.

Five minutes later, the timer tick event happens. I would like to
instruct the bound controls to report the new data. The new data would
be 123, 25 and 20 perspectively.

The data in tciBatchLog is being changed by an external process. All
this app is doing is looking at the data and reporting it. It's kind of
like checking your stocks periodically during the day.

So my question is, how do I instruct the bound controls to refresh with
the new data values?

Thanks again! I appreciate the help.

Bryan Shaw
bs***@amerexenergy.com

Nicholas Paldino [.NET/C# MVP] wrote:
Bryan,

The BindingSource can't trigger another fetch. What you have to do is
set the DataSource property to a new version of the table. However, this
will most likely cause the current position and whatnot to change.

You are better off updating the bound table with the changes from the
database (by cycling through the table and adding/deleting/editing the
records where appropriate).

Hope this helps.

Jan 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Leonardo | last post: by
3 posts views Thread by --== Alain ==-- | last post: by
4 posts views Thread by Christian | last post: by
5 posts views Thread by jehugaleahsa | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.