This is the way that we try:
instead of:
DataAccessAdapter adapter = new DataAccessAdapter()
adapter.FetchEntityCollection(list, filter, prefetchpath);
we do:
string assembly = ConfigurationSettings.AppSettings["AssemblyDataAccessPath"];
IDataAccessAdapter adapter = myFactory.newDataAccess(assembly)
adapter.FetchEntityCollection(list, filter, path);
we have three VS projects:
1: myoracle_dal
2: myoracle_dalDBSpecific
3: mymssql_dalDBSpecific --> The mymssql_dal go to trash!!
Well, we configure dinamically the "AssemblyDataAccessPath" setting to myoracle_dalDBSpecific assembly or to mymsql_dalDBSpecific
When we try with the myoracle_dalDBSpecific the app works fine. But when we try with mymssql_dalDBSpecific we have this exception:
System.IndexOutOfRangeException
in the CreateSelectDQ method of DataAccessAdapter class
This is the trace of the Fetch:
Method Enter: DataAccessAdapterBase.FetchEntityCollection(3)
Method Enter: DataAccessAdapterBase.FetchEntityCollection(6)
Active Entity Collection Description:
EntityCollection: es.novasoft.xsia.his.novahis.dal.HelperClasses.EntityCollection. Will contain entities of type: CamaEntity
'testHIS.exe': se cargó 'c:\src\xsiahis\testhis\bin\debug\sd.llblgen.pro.dqe.sqlserver.net11.dll', no se pueden cargar símbolos.
Method Enter: CreateSelectDQ (Paging)
Method Enter: CreateSelectDQ
Method Exit: CreateSelectDQ
Method Exit: CreateSelectDQ (Paging): no paging.
Method Enter: DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery
Method Enter: DataAccessAdapterBase.OpenConnection
'testHIS.exe': se cargó 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll', no se pueden cargar símbolos.
'testHIS.exe': se cargó 'c:\windows\assembly\gac\mscorlib.resources\1.0.5000.0_es_b77a5c561934e089\mscorlib.resources.dll', no se pueden cargar símbolos.
Method Exit: DataAccessAdapterBase.OpenConnection
Method Enter: EntityCollectionBase2.Add
Entity to Add Description:
Entity: es.novasoft.xsia.his.novahis.biz.CamaEntity2. ObjectID: 6b4f1c45-883f-4673-8197-688a4c6c82ea
PrimaryKey field: CodCama. Type: System.String. Value: 2
Index of added entity: 0
Method Exit: EntityCollectionBase2.Add
Method Enter: EntityCollectionBase2.Add
Entity to Add Description:
Entity: es.novasoft.xsia.his.novahis.biz.CamaEntity2. ObjectID: b0e2a38a-4f53-489b-ba08-48bb20aa9344
PrimaryKey field: CodCama. Type: System.String. Value: 1
Index of added entity: 1
Method Exit: EntityCollectionBase2.Add
Method Enter: DataAccessAdapterBase.CloseConnection
Method Exit: DataAccessAdapterBase.CloseConnection
Method Exit: DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery
Method Exit: DataAccessAdapterBase.FetchEntityCollection(6)
Method Enter: DataAccessAdapterBase.FetchPrefetchPath
Method Enter: DataAccessAdapterBase.FetchEntityCollection(6)
Active Entity Collection Description:
EntityCollection: es.novasoft.xsia.his.novahis.dal.HelperClasses.EntityCollection. Will contain entities of type: IngresoEntity
Method Enter: CreateSelectDQ (Paging)
Method Enter: CreateSelectDQ
Excepción no controlada del tipo 'System.IndexOutOfRangeException' en sd.llblgen.pro.dqe.sqlserver.net11.dll