Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Got "System.Data.SqlClient.SqlCommand:ExecuteReader" twice in JITCompilationStarted function.

$
0
0

I am seeing something weird my .Net Web application. 

The below is my code

            SqlConnection myConn = new SqlConnection(@"Server=192.168.2.2;Initial Catalog=sss;User ID=dsd;Password=sdd");
            SqlCommand myCommand = new SqlCommand("select * from sss.ALARM", myConn);
            SqlDataReader dataReader;

            try
            {
                myConn.Open();
                dataReader = myCommand.ExecuteReader();

                GridView1.DataSource = dataReader;
                GridView1.DataBind();
                dataReader.Close();
                myCommand.Dispose();
                myConn.Close();
            }
            catch (System.Exception ex)
            {
                Response.Write(ex.ToString());
            }

While this application get attached to my .Net profiler that have set Jit Compilation event mask, I am getting two "System.Data.SqlClient.SqlCommand:ExecuteReader" calls in JITCompilationStarted function.

But there is only one Executereader used. What is the reason for this ?

Thanks

-Selva




Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>