Hi,
I've generated classes for a SQL 2000 DB With the Name of Rainbow (I'm using Adapter). Everything works o.k.
I've now tested it with a db of a different name (same tabls etc) but I'm getting the following error:
_Message: An exception was caught during the execution of a retrieval query: Invalid object name 'MyPharma.dbo.tidir_Directory'.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
Source: SD.LLBLGen.Pro.ORMSupportClasses.NET11
TargetSite: System.Data.IDataReader Execute(System.Data.CommandBehavior)
StackTrace: at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, Boolean allowDuplicates, IValidator validatorToUse)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket)
at TotalIngenuity.Module.Directory.Display..ctor()
at ASP.Directory_ascx..ctor()
I know Adapter contains the name of the catalog in the code. And you can override that at runtime but I want it to be easily configurable via the web.config file so I've added the following:
<add key="Main.ConnectionString" value="data source=;initial catalog=MyPharma;User ID=;Password=***;persist security info=False;packet size=4096"/>
<add key="CatalogNameUsageSetting" value="1"/>
<add key="CatalogNameToUse" value="MyPharma" />
Do you know where I have gone wrong?
Thanks,
John