A DataReader is a one direction connection - once you read a row, you can;t go back to teh previous one.
So when you use DataTable.Load to read from the SqlDataReader, it closes the Reader when it's finished with all data.
Why are you trying to use the same DataReader to read all the data twice? Instead, loop through the DataTAble result to provide your log info.
Better, use an SqlDataAdapter and load the datatable from that instead, as it opens teh connection object for you.
And
using
blocks shouldn't be written like that:
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["TextItConnectionString"].ConnectionString))
{
con.Open();
Library.writeErrorLog("connection build and open");
using (SqlCommand cmd = con.CreateCommand())
{
Is the better method as it ensures the variable is Disposed when it goes out of scope.