I am a DBA and am working on a C# Windows Service to monitor a number of SQL Servers. I am collecting a number of items and storing them in a database for later reference. It is a pet project, and I could buy an off the shelf solution but I enjoy writing code. I have a problem in the implementation of my typed datasets and the way the threadpool I have for processing attempts to save data. If I start the service up, I can see it run and save data for a few cycles, but then at random points, it throws a SQL exception. Failed to Connect, Connection state connecting. Is this a problem with typed data sets, or have a built a non-safe set of code around connecting to SQL? The service instantiates a class that manages working with the tableadapters for me, and the class has to be instantiated for each call to save, so I wouldn't think it would be allowing a connection close by one thread while another thread is trying to use it, but I could be wrong. Does any of this make sense?
Jon