Hello
Heres the outline of the problem:
A single asp.net page is calling our DAL in 2 different places to request data. One request is in the page itself and returns our search results, the other is in a custom control on the page.
Both requests (one from the page one from the control) are using new instances of our DAL component, and the component itself creates new commands and connections. Both methods in the DAL use DataReader.NextResult to read multiple result sets back from the sprocs they call.
What is happending, and only a few times a day for a busy site, is that one method is getting the result set destined for the other method, which is we assume being called at the same time.
As I cannot replicate the error during debug we log the number of fields and their names when this error occurs and I can see the fields match exactly what should be comming back for the other method.
Im not sure if this is an expected error, as both requests I guess are using the same thread. I can only assume if happens randomly because most of the time one method must finish before the other one is called and only sometimes when the first one takes longer to execute do their execution clash like this.
Has anyone ever seen this before? I know we could just code it without the DataReader.NextResult but Im more worried what else this effects I have not found yet.
Thanks
Brian Norman
www.earthware.co.uk