V
Valerie Hough
Hi,
I am debugging an application which uses C# with .NET v1.1. It attempts to
implement asynchronous dataset retrieval by using separate threads and
synchronizing them with the UI form. Recently the application is having some
problems whereby it is crashing with a "General Network Error" and a call
stack that looks approximately like this:
System.Data.SqlClient.SqlDataReader.TdsParser.ThrowExceptionAndWarning()
System.Data.SqlClient.SqlDataReader.TdsParser.ReadNetLib(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadBuffer(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadByteArray(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadEncodingChar(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadValue(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ProcessRow(...)
System.Data.SqlClient.SqlDataReader.PrepareRecord(int32)
System.Data.SqlClient.SqlDataReader.GetValues(Object [] values)
AsynchronousReadDataThread()
Notes:
- In the form application, Thread.Join() is used if the dataset read is not
complete.
- There might be 10-20 threads reading at any given point in time.
- It is a hit and miss type of problem that only seems to occur with heavy
usage across several CPUs.
Does anyone know what the cause of this might be?
Are these read threads safe if they happen to be executing views that might
join some of the same tables as one another?
Assuming that the asynchronous reading is necessary, is this approach
conceptually sound?
I see that .NET 2.0 is just released with support for this sort of thing
built in. Do I need VS 2005 to incorporate it into apps?
Thanks in advance for any help.
Valerie Hough
I am debugging an application which uses C# with .NET v1.1. It attempts to
implement asynchronous dataset retrieval by using separate threads and
synchronizing them with the UI form. Recently the application is having some
problems whereby it is crashing with a "General Network Error" and a call
stack that looks approximately like this:
System.Data.SqlClient.SqlDataReader.TdsParser.ThrowExceptionAndWarning()
System.Data.SqlClient.SqlDataReader.TdsParser.ReadNetLib(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadBuffer(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadByteArray(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadEncodingChar(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ReadValue(...)
System.Data.SqlClient.SqlDataReader.TdsParser.ProcessRow(...)
System.Data.SqlClient.SqlDataReader.PrepareRecord(int32)
System.Data.SqlClient.SqlDataReader.GetValues(Object [] values)
AsynchronousReadDataThread()
Notes:
- In the form application, Thread.Join() is used if the dataset read is not
complete.
- There might be 10-20 threads reading at any given point in time.
- It is a hit and miss type of problem that only seems to occur with heavy
usage across several CPUs.
Does anyone know what the cause of this might be?
Are these read threads safe if they happen to be executing views that might
join some of the same tables as one another?
Assuming that the asynchronous reading is necessary, is this approach
conceptually sound?
I see that .NET 2.0 is just released with support for this sort of thing
built in. Do I need VS 2005 to incorporate it into apps?
Thanks in advance for any help.
Valerie Hough