This question is locked. New answers and comments are not allowed.
I am using the following code to retrieve data from a custom sql db view. It is returning the correct number of rows, but the problem is that each row is the same...the first record being retrieved. See image attached. I use the same code for a direct sql access from a table and it runs correctly. Any ideas?
public
List<NoPhoneFollowUp30Day> GetNoPhoneInitialFollowUp30Days(
string
userID)
{
List<NoPhoneFollowUp30Day> NoPhone30DaysYearList =
new
List<NoPhoneFollowUp30Day>();
string
[] statesArray =
new
string
[0];
IQuery q1 = sc.GetSqlQuery(@"SELECT [TelephoneReportID]
,[FacilityID]
,[Facility Name]
,[Date Time Received]
,[Company]
,[Last Name]
,[First Name]
,[DateTimeReceived]
,[ReportingState]
FROM [CRERNS].[dbo].[NoPhoneFollowUp_30Days]
ORDER BY DateTimeReceived DESC",
typeof
(NoPhoneFollowUp30Day),
null
);
return
DataDriver.Utilities.ToList<NoPhoneFollowUp30Day>(q1.Execute().ToList());
}
public
static
class
Utilities
{
public
static
List<T> ToList<T>(ArrayList arrayList)
{
List<T> list =
new
List<T>(arrayList.Count);
foreach
(T instance
in
arrayList)
{
list.Add(instance);
}
return
list;
}
}