473,414 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 6312
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: TN | last post by:
I just don't get the BindingSource class when it is bound to a class. Consider this code snip: ..... Private bSource As New BindingSource() Private dgv As New DataGridView() Public Sub New()...
1
by: Leonardo | last post by:
Hi. I'm trying to build my first application with database access using VB 2005. I'm a VB 6 programmer and learning everything again has been challenging. I managed to write a code using some tips...
3
by: --== Alain ==-- | last post by:
Hi, I have a control which has a collection property. when an item of the collection property will be added, removed, and so on, i would like to refresh the control itself. Usually for that i...
7
by: Mike | last post by:
i have a small difficulties with BindingSource and dataGridView bind db has properly opened and bind doesn't works. Unfortunately I didn't find any good example how to connect MS Access with...
1
by: Daniel Jeffrey | last post by:
..Net 2.0 VStudio 2005 C# I know this is going to seem like a strange question, as even I am sure I have missed something - but I cant find it. I want a simple event on any of the objects...
4
by: Christian | last post by:
Hi, i TRY to create a windows apllication that insert in a Access DB name and surname; the Insert istruction Works but the the refresh of DataGridView doesn't works... the code is : public...
2
by: jehugaleahsa | last post by:
Hello: I'm working on improving some of our Windows Forms. I have created two user controls that I want to bind to the same BindingSource. I have an overview control that is used just to...
5
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This...
2
by: TamusJRoyce | last post by:
I am working on a group project where I do not have access to a BindingSource that is being passed through a function. The BindingSource's DataSource is set to a custom IBindingListView Collection....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.