Hello,
I'm receiving a System.InvalidCastException when trying to populate an Entity or Collection. Not sure what's going on, but it seems as if a connection is not being created. I'm using an Oracle 10 db. I am able to connect to the same db in other apps using ODP.Net without problem, so I know my listener and connection string are working.
This is my first time using LLBLGen in development, so I have no idea what I could be doing wrong or where to go next. This seems like an awesome tool, just hoping I can get this issue worked out
Please help!
Here are two separate methods that lead to the exception: (i've tried both methods with and without data in the table in question)
HtjobsDepartmentsEntity hd = new HtjobsDepartmentsEntity(2);
OR
HtjobsDepartmentsCollection hdc = new HtjobsDepartmentsCollection();
hdc.GetMulti(null);
here's what my web.config appSettings looks like: (xx's replaced with real values of course)
<add key="Main.ConnectionString" value="data source=xxxxxx;User Id=xxxxxx;Password=xxxxxx;persist security info=false;"/>
here's the Stack Trace:
[InvalidCastException: Specified cast is not valid.]
Oracle.DataAccess.Client.OracleCommand.System.Data.IDbCommand.set_Connection(IDbConnection value) +12
SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery..ctor(IDbConnection connectionToUse, IDbCommand commandToUse) +44
SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32& uniqueMarker) +266
SD.LLBLGen.Pro.DQE.Oracle.DynamicQueryEngine.CreateSelectDQ(IEntityFields selectList, IDbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IGroupByCollection groupByClause) +89
Hickorytech.Base.DaoClasses.HtjobsDepartmentsDAO.FetchHtjobsDepartments(IEntity entityToFetch, ITransaction containingTransaction, Int32 deptid, IPrefetchPath prefetchPathToUse) +231
Hickorytech.Base.EntityClasses.HtjobsDepartmentsEntityBase.Fetch(Int32 deptid, IPrefetchPath prefetchPathToUse) +67
Hickorytech.Base.EntityClasses.HtjobsDepartmentsEntityBase.InitClassFetch(Int32 deptid, HtjobsDepartmentsValidator validator, IPropertyDescriptorFactory propertyDescriptorFactoryToUse, IEntityFactory entityFactoryToUse, IPrefetchPath prefetchPathToUse) +55
Hickorytech.Base.EntityClasses.HtjobsDepartmentsEntityBase..ctor(Int32 deptid) +64
Hickorytech.Base.EntityClasses.HtjobsDepartmentsEntity..ctor(Int32 deptid) +5
hickorytech._admin_.departments.Page_Load(Object sender, EventArgs e) in g:\inetpub\wwwroot\hickorytech\employment\_admin_\departments.aspx.cs:31
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750