I basically copied the example from microsoft.com, but it seems that CommandType does not exist in the current context. The example does not show declaring it.
Thanks
string SQLstring = @"Server=DELLXPS\SQLEXPRESS;Database=SEIN;Integrated Security=true";
SqlConnection sqlConnection1 = new SqlConnection(SQLstring);
SqlCommand cmd = new SqlCommand();
SqlDataReader reader;
cmd.CommandText = "SELECT * FROM ResidentUsers";
cmd.CommandType = CommandType.Text;
cmd.Connection = sqlConnection1;
sqlConnection1.Open();
reader = cmd.ExecuteReader();
// Data is accessible through the DataReader object here.
sqlConnection1.Close();
usingdirective for its namespace.