473,574 Members | 3,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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***@amerexene rgy.com
Jan 10 '06 #1
2 6320
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.co m

"Bryan Shaw" <bs***@amerexen ergy.dontspamme .com> wrote in message
news:e6******** ******@TK2MSFTN GP11.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***@amerexene rgy.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***@amerexene rgy.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
4529
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() InitializeComponent()
1
12157
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 from a book I recently bought. The navigation works fine. My problem starts when it comes to adding new registers. I have three tables: clients,...
3
1460
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 use eventhandler in the set method of the property. But as the collection property has only a get method, i'm not able to do it so.
7
13440
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 dataGridView and BindSource class. Maybe something like this: DataTable dtResult = new DataTable(); dtResult = GetData(); // this line returns a...
1
8103
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 (BindingSource, DataSet, DataTable) that fires when data in a bound control changes.
4
4942
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 Form1() { InitializeComponent(); } #region Variabili
2
4500
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 identify a customer. Then there is a details view that shows all their specifics. I wanted to keep navigation outside of my view. There is also a
5
4929
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 will make it clear to the user that they have to create a new item first before they start working. This needs to be an easy process because there...
2
4652
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. When I try to set IsNew on the BindingSource having the custom IBindingListView, the BindingSource IsNew remaines false. I have been able to do...
0
7842
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7764
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8273
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6514
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5658
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3775
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1102
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.