sql - c# threading and databases -
I got a winform with some child forms on it. Now I am reaching hair forms through my Tree Tree by the TreeVision. Now there is a list of websites in that treview, since a website is actually a group of pages, it is also shown in the tree. The website is my parents and pages are children.
When you click on a single page, the statistics are shown as a child. When a website is clicked, the summary of all the pages is shown from that website. Since there may be a lot of data, I am using a background worker who gets the position in the background after loading the treeview.
As long as I am changing something in the data and it saves it automatically in the database (sqlserver2008) Then my pageisation generated errors and said that sqlreader is closed. So I'm thinking how I can solve it.
Do I have to use databases on a different connection? Any other ideas out there?
Thanks
Are you using the same database connection object? ? It is not safe Each thread should have its own database connection, or its use must be synchronized so that only one thread can access the database connection object at any time.
Comments
Post a Comment