I am trying to refresh my memory with programming in ASP.NET. I have a simple select statement that I know returns records and this code was working but now it doesn't anymore and I can not figure out why?
Any tips or suggestions will be greatly appreciated.
Code:
con.Open();
AsaDataAdapter cmd = new AsaDataAdapter(sqlString.ToString(), con);
DataSet ds = new DataSet();
cmd.Fill(ds);
if(ds == null || ds.Tables[0].Rows.Count == 0)
lblNoRecord.Visible = true;
else
lblNoRecord.Visible = false;
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
Any tips or suggestions will be greatly appreciated.