I have very recently started to use RAD Controls. I have been trying to implement the RADScheduler control since the past week. After overcoming a variety of errors, I've been stuck on this particular error for the past 2 days. I'm pasting the code where this error is coming.
private
IEnumerable<Resource> GetTeachers()
{
List<Resource> resources = new List<Resource>();
using (DbConnection conn = OpenConnection())
{
DbCommand cmd = DbFactory.CreateCommand();
cmd.Connection = conn;
cmd.CommandText =
"SELECT [TeacherID], [Name], [Phone] FROM [DbProvider_Teachers]";
using (DbDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
Resource res = new Resource();
res.Type =
"Teacher";
res.Key = reader[
"TeacherID"];
res.Text =
Convert.ToString(reader["Name"]);
res.Attributes[
"Phone"] = Convert.ToString(reader["Phone"]);
resources.Add(res);
}
}
}
return resources;
}
The error disappears when I comment and run the program but obviously i am not able to use this functionality then. Please help asap.
Thank you,
Manan Podar