dataset question. probably very simple

Feb 12 2004 12:06 AM
okay feel like a bit of a muppet because i cant get this to work i have created a custom dataset called personEntity. i am using the microsoft application block for data access to fill the dataset. well i am hoping to use the data access block here is my current code public static PersonEntity GetPerson(Guid gidPersonID) { SqlParameter[] sqlParams = new SqlParameter[0]; PersonEntity ds = new PersonEntity(); try { sqlParams[0] = new SqlParameter("@PersonID",gidPersonID); SqlHelperParameterCache.CacheParameterSet(connString,"prcPerson_Select_PersonByID",sqlParams); ds = SqlHelper.ExecuteDataset("temp","prcPerson_Select_PersonByID",sqlParams); return ds; } catch(SqlException Ex) { } } okay my problem is that when i set the ds to execute the dataset call of the app block it says that it can not do an implicit conversion of type system.data.dataset to type person entity dataset what have i done wrong. what do i need to change to be able to use the application block and also use a custom dataset. before i have been using the data reader and building an array list of a class with lots of properties. cheers

Answers (2)