Answers for "there is already an open datareader associated with this conne ction which must be closed first."

C#
0

c# datareader already open visual studio mysql

// Always, always, always put disposable objects inside of using statements:
using (Connection c = ...)
{
    using (DataReader dr = ...)
    {
        //Work with dr in here.
    }
}
//Now the connection and reader have been closed and disposed.
Posted by: Guest on February-01-2021

Code answers related to "there is already an open datareader associated with this conne ction which must be closed first."

C# Answers by Framework

Browse Popular Code Answers by Language