Forum Moderators: open
In addition, should I be using a DataGrid instead of a DataReader in this case?
private void LoadManualUsage()
{
SqlConnection conn = new SqlConnection(
"connection details here");
SqlCommand comm = new SqlCommand(
"Select column1, column2, column3, column4 * From someTable where processStatus = 1", conn);
SqlDataReader reader;
try
{
conn.Open();
reader = comm.ExecuteReader();
while (reader.Read())
LDCUsageLabel.Text += reader.();
reader.Close();
}
catch
{
Response.Write("Error gathering table data.");
}
finally
{
conn.Close();
}
}