DaoBase dao error

Posts   
 
    
Sjoukje
User
Posts: 3
Joined: 12-Dec-2007
# Posted on: 12-Dec-2007 13:14:22   

Hi,

I'm receiving this error after compiling my project:

DaoBase dao = (DaoBase)CreateDAOInstance();

return dao.GetMulti(this.Transaction, this, maxNumberOfItemsToReturn, sortClauses, this.EntityFactoryToUse, this.ValidatorToUse, selectFilter, relations, pageNumber, pageSize);

Stack Trace:

[InvalidCastException: Specified cast is not valid.] SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase.GetMulti(IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, Int32 pageNumber, Int32 pageSize) in D:\Source\TommyHilfiger\CreditReturnRequestForm\ORMSupportClasses\EntityCollectionBase.cs:691 SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase.GetMulti(IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses) in D:\Source\TommyHilfiger\CreditReturnRequestForm\ORMSupportClasses\EntityCollectionBase.cs:645 Tommy.Hilfiger.CRRF.Businesslogic.Employee.IsCountryManager(String FullNTlogin) in D:\Source\TommyHilfiger\CreditReturnRequestForm\Tommy.Hilfiger.CRRF.BusinessLogic\Employee.cs:60 Tommy.Hilfiger.CRRF.WebApp.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Tommy.Hilfiger.CRRF.WebApp\default.aspx.cs:49 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain()

I've used 'Selfservicing 2 class scenario (full) VS.net 2003' and 'C#.net Template set for SQLServer'. (and all the other options)

The database I'm using is SQLServer 2005, The version number of LLBLgenPro is 1.0.2005.1 Final (October 30th, 2005)

Is there anybody who know's this error? Please advise!

Sjoukje

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 12-Dec-2007 16:06:28   

I'm receiving this error after compiling my project:

That's a runtime error not a compile time error, right?

Would you please post the corresponding code snippets? Or attach a simple repro solution?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 13-Dec-2007 11:07:47   

Please update your 1.0.2005.1 version to the latest build (get it from our customer area: http://www.llblgen.com ->login at the top)

Also, make sure your generated code is in sync with your database schema. If there were recent changes to the db schema, please refresh the catalog and regenerate the code.

Frans Bouma | Lead developer LLBLGen Pro