This seems like it should be easy, but I can't quite find an explanation that fits what I'm looking for. Does anyone know of a way to access a database in the background of a form, and update controls on the form? For example, my visual C# application is loading some text boxes and labels from a MYSQL web server database. When someone updates the website database, I'd like for the changes to be automatically reflected in the C# application. I've tried using a timer, but the form locks up when the timer goes off and retrieves the data. The backgroundworker control looks promising, but I can't seem to get it to run more than once, and haven't had much luck at all even getting it to do what I want. Is the backgroundworker the way to go in my case? If so, can it be set so that it constantly hits the database like every 30 seconds or so? Any recommendations would be appreciated!
Thanks,
lock()
) and setting a flag if changes occurred.lock()
to avoid tearing)