Vishan S Gill

Vishan S Gill

  • NA
  • 15
  • 13.4k

ASP.NET TableAdapter

Jul 25 2011 3:38 PM
Hi All,

I've been trying to select data using TableAdapter. Everything works fine except for one part of my application:

Guid userKey = new Guid();
userKey = getUserKeyFromName(username);
DataTable courseForUser = new DataTable();
try
{
    courseForUser = userInCourseAdapter.getUserCourses(userKey); <--- Returning NULL if user is part of more than one course
}...

The Code above just selects data from a table in sql and return a list of courses the user is in. The problem is that it's returning null. But when I test it on the TableAdapter query it works. Also if the user is listed in one one course it works.

Basically it gives me null if the user is part of more than one course! I have no idea why! Anyone faced this issue before?

Am I missing something here ??? :o

Thanks in advance,
Vish



Answers (2)