Last post Mar 31, 2006 08:50 PM by Pztydr
Mar 30, 2006 11:28 PM|Pztydr|LINK
I have a problem with a dropdown list in the module i am developing. I have put in place the code to collect the data from the database.
I am using the following code:
_LocationID = Value
_LocationName = Value
objEmpLocation = objEmplocations.GetEmpLocation()
but the last line gives me an error of :
Value of Type 'HomeProd.Modules.TeamMgr.LocationInfo' cannot be converted to 'System.Collections.Generic.List(Of HomeProd.Modules.TeamMgr.LocationInfo)'
I don't exactly know what's happening here so anyones help would be greatly appreciated.
Mar 31, 2006 08:53 AM|rstieb|LINK
At first glance, it looks like you're "GetEmpLocation" method is returning an IDataReader but is looking for a list of locationinfo objects...
Hope this gets you going in the right direction.
Mar 31, 2006 08:50 PM|Pztydr|LINK
yes I mahaged to resolve the problem yetserday after I posted the question. I needed a list of locations and what I had setup was only returniing a single location (first record in the table). I proved this by using a objectdatasource which indeed
only returned a single record.
Once I altered my call and return from the database to a List all was okay, thanks for your assistance.