Refresh BindingSource .net 2005

  • Thread starter Thread starter Bryan Shaw
  • Start date Start date
B

Bryan Shaw

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
(e-mail address removed)
 
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.
 
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
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top