>> What I didn't expect was that all command.Cancel()'s to take (as reported by
>> the profiler) more than 50% of the time. Such command is an ExecuteQuery
>> and the DataReader had already read all the records.
> 
> And why are you calling the Cancel?
> 

I have a wrapper class that abstracts some layers and on some database
engines (I don't remember which one, it might be SQLServer) if you call
Close() on a command whose reader weren't consumed the Close() keeps
reading the records up to the end. So as a sanity measure I added a Cancel()
in the Dispose() method of the wrapper.

I've just modified the wrapper and instead of calling Cancel() unconditionally
it first check if the DataReader was consumed or not and only cancel if it
wasn't.



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to