Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8061589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:23:16+00:00 2026-06-05T10:23:16+00:00

SqlDataReader myReader1 = null; SqlCommand myCommand1 = new SqlCommand(SELECT Standard_Note_Code, COUNT(Standard_Note_Code) as Count FROM

  • 0
SqlDataReader myReader1 = null;
SqlCommand myCommand1 = new SqlCommand("SELECT Standard_Note_Code,     COUNT(Standard_Note_Code) as Count FROM [Excel_table] where Standard_Note_Creator_Name =  '" + ddlrep.Text + "' and (Std_Note_Date_Entered >= '" + datefrom + "' and Std_Note_Date_Entered <= '" + dateto + "') group by Standard_Note_Code", myConnection);

myReader1 = myCommand1.ExecuteReader();
myReader1.Read();

gvsummary.Visible = true;
if (myReader1.HasRows)
{                    
    gvsummary.DataSource = myReader1;
    gvsummary.DataBind();

}
else
{
    myReader1.Close();
    //myConnection.Close();
    //Label2.Text = "No Records Exist";
}
myReader1.Close();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:23:18+00:00Added an answer on June 5, 2026 at 10:23 am

    Remove myReader1.Read();, after ExecuteReader. That line causes the grid to start reading from the 2nd position.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SqlDataReader reader; String sqlreadcom = SELECT Balance FROM IncomeGenerator; using (reader = new SqlCommand(sqlreadcom,sqlCon).ExecuteReader())
it does not gave any value using (SqlCommand cmd = new SqlCommand(SELECT SUM(Paied) FROM
If I do something like this: using (SqlCommand cmd = new SqlCommand(SELECT * FROM
What's the difference between reading a value from an SqlDataReader using this syntax: Dim
What are the differences between using SqlDataAdapter vs SqlDataReader for getting data from a
SqlDataReader myreader; myreader = cmmd.ExecuteReader(); StringBuilder sb = new StringBuilder(); sb.Append(<b>Vaccine</b>&nbsp;&nbsp;&nbsp;<b> Vaccination Date</b>&nbsp;&nbsp;&nbsp;<b> Vaccination
I use SqlDataReader.GetValue method to read values from DB: Log.WriteLine(Value of CompanyName column: +
1) I have the following codes: private static sqlDataReader gCandidateList = null; public SqlDataReader
... ... ... try { string Tags_collect; SqlDataReader Data1 = cmd.ExecuteReader(); Data1.Read(); lbl_q_title.Text =
public partial class Stats : System.Web.UI.Page { public SqlDataReader DataReader; public SqlCommand Command; string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.