473,480 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Threading, datagrid and asynchronous events

I have an Windows form app which receives data asynchronously thru an
external app. The events are handled by some event handler code which locks
the dataset table that the data is being placed in while the event is being
handled. The table being updated is bound to a datagrid. The app crashes
after a random amount of time. The error is only trapped at the application
level and seems to have sometime to do with the datagrid. When I remove the
binding to the datagrid no crash occurs. Can someone provide an explanation
and/or point me towards a design or reference for handling this situation?

Nov 16 '05 #1
1 1860
Hi there... I'd suggest you to have a temporary table (with a structure
similar to the one bound to the datagrid). Receive the data in the
temporary. Have a timer in your form, when the timer's tick event is fired
copy the information from the temporary to the working table (bound to the
datagrid). It's an easy way to get what you want. Hope this may help you.

Regards,
--
Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda
http://ajhsis.net

"Bob1739" <Bo*****@discussions.microsoft.com> escribió en el mensaje
news:AB**********************************@microsof t.com...
I have an Windows form app which receives data asynchronously thru an
external app. The events are handled by some event handler code which
locks
the dataset table that the data is being placed in while the event is
being
handled. The table being updated is bound to a datagrid. The app crashes
after a random amount of time. The error is only trapped at the
application
level and seems to have sometime to do with the datagrid. When I remove
the
binding to the datagrid no crash occurs. Can someone provide an
explanation
and/or point me towards a design or reference for handling this situation?

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
406
by: Avi Kadosh | last post by:
hi all I am new to Csharp I tried the following code using System; using System.Threading;
3
2362
by: Elliot Rodriguez | last post by:
Hi: I am writing a WinForm app that contains a DataGrid control and a StatusBar control. My goal is to update the status bar using events from a separate class, as well as some other simple...
8
1491
by: MattB | last post by:
Hello I am starting a new thread in a button click event. This thread calls an method which sends emails, I don't want the page to wait for the emails to finish going out as it slows the user...
7
297
by: Tim | last post by:
Hi, I have developed a windows forms application that works fine on a single thread. Part of the requirements of this app is that it monitors the status of a couple of services. So I think...
0
6911
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
7050
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
7091
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...
1
6743
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...
0
6966
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
5344
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,...
1
4787
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
2999
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...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.