Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2005

Tip: Looking for answers? Try searching our database.

Problem with currencymanager and TrueDBGrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mathieu.lapointe@gmail.com - 26 Jul 2005 14:54 GMT
Hi,

I have a problem with a currencymanager bind with a datatable which is
the datasource of a Component One True DBGrid. An event update the
datatable every 30 seconds and the problem occurs when we have one
record and we pass to none, or we don't have any record and we add one
record. When the datatable is modified by the events, all the
procedures are done, but after, the application is frozen, but the code
behind continue to run normally. The event still be raised every 30
seconds and behind all work fine, but the application is frozen, and I
don't know why. I try to find where it can be frozen with breakpoints
in my code, but the breakpoints are not reached.

Is someone can help me?

Regards

Mathieu Lapointe
Ilya Tumanov [MS] - 26 Jul 2005 20:22 GMT
If you're updating UI controls (directly or indirectly, e.g. via data source
update) from another thread, your application will freeze from time to time.

You have to use Control.Invoke to update your controls from another thread
(e.g. System.Threading.Timer).

This problem is well known to Compact Framework developers as CF application
would freeze in ~99% of all cases.

Desktop developers are mostly unaware they have to use Control.Invoke as it
freezes in may be 1% of all cases.

Even though it works most of the time, the problem remains and you have to
do some extra work to ensure reliability of your application.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactfra
mework?hl=en

2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

> Hi,
>
[quoted text clipped - 14 lines]
>
> Mathieu Lapointe
mathieu.lapointe@gmail.com - 27 Jul 2005 21:47 GMT
Hi

I update my datasource when I Receive a new Message through a
MessageQueue on the ReceiveCompleted event of the MessageQueue.

Cheers

Mathieu Lapointe
Ilya Tumanov [MS] - 27 Jul 2005 22:13 GMT
Yes, that's on a separate thread. Rule of thumb: assume events from all
asynchronous methods (e.g. BeginReceive()) are on the separate thread.

Please use Control.Invoke. In case you're not sure, there's
Control.InvokeRequired to check if you have to use Control.Invoke.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactfra
mework?hl=en

2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

> Hi
>
[quoted text clipped - 4 lines]
>
> Mathieu Lapointe
mathieu.lapointe@gmail.com - 03 Aug 2005 13:53 GMT
Thank, It works and fix my problem

Cheers

Mathieu Lapointe

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.