You need to change the connection string and add this option
"MultipleActiveResultSets=True;"
Starting with SQL Server 2005, there is the MARS option.
With MARS, a single open connection can serve more than one command at a time. So, for example, your connection string should look something like this:
"Server=myServerAddress;" + "Database=myDataBase;" + "Trusted_Connection=True;" + "MultipleActiveResultSets=true;"
See documents at MARS
In a "normal" configuration, when SqlDataReader is open, SqlConnection is busy with the read service and cannot accept other commands.
(See Notes at the link to SqlDataReader).
There is a reader in the code above that opens when you try to execute a command using the same connection.
There are workarounds such as populating a DataSet and looping it (but for large sets it will affect performance), so the SQL team at Microsoft introduced MARS
source share