View Single Post
  #4 (permalink)  
Old March 2nd, 2009, 03:47 PM
alliancejhall alliancejhall is offline
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default How about this?

I'm not totally strong on C# but I "think" this is what you want

Code:
    
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings("Minds").ConnectionString);
    SqlCommand cmdd = new SqlCommand("Select HomeLeft from Home");
    SqlDataReader dr = null;
    cmdd.Connection = con;
    con.Open();
    dr = cmdd.ExecuteReader();
    dr.Read();
    if (dr.HasRows() == true) {
        this.label1.Text = dr("HomeLeft").ToString;
    }
    con.Close();
__________________
Jason Hall

Follow me on Twitter @jhall2013