This question is locked. New answers and comments are not allowed.
Hi,
i am new to Telerik ORM. I've tried setting up my first orm project with two database connections but i'm always getting an error message which refers to a resolving issue. This has surely to do with a configuration problem in my app.conigs. So, hope you can help me.
Here's my code...
app.config of GeoDataClasses
| <?xml version="1.0"?> |
| <configuration> |
| <configSections> |
| <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" /> |
| </configSections> |
| <openaccess xmlns="http://www.telerik.com/OpenAccess"> |
| <references /> |
| <connections> |
| <connection id="GeoDataConnection"> |
| <databasename>database1</databasename> |
| <servername>myserver</servername> |
| <integratedSecurity>True</integratedSecurity> |
| <backendconfigurationname>mssqlConfiguration</backendconfigurationname> |
| </connection> |
| </connections> |
| <backendconfigurations> |
| <backendconfiguration id="mssqlConfiguration" backend="mssql" driver="ntds"> |
| <mappingname>mssqlMapping</mappingname> |
| <databaseMapping> |
| </databaseMapping> |
| </backendconfiguration> |
| </backendconfigurations> |
| <mappings current="mssqlMapping"> |
| ...some field mappings |
| </mappings> |
| </openaccess> |
| </configuration> |
app.config of MediaCenterClasses
| <?xml version="1.0"?> |
| <configuration> |
| <configSections> |
| <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" /> |
| </configSections> |
| <openaccess xmlns="http://www.telerik.com/OpenAccess"> |
| <references /> |
| <connections> |
| <connection id="MediaCenterConnection"> |
| <databasename>database2</databasename> |
| <servername>myserver</servername> |
| <integratedSecurity>True</integratedSecurity> |
| <backendconfigurationname>mssqlConfiguration</backendconfigurationname> |
| </connection> |
| </connections> |
| <backendconfigurations> |
| <backendconfiguration id="mssqlConfiguration" backend="mssql" driver="ntds"> |
| <mappingname>mssqlMapping</mappingname> |
| <databaseMapping> |
| </databaseMapping> |
| </backendconfiguration> |
| </backendconfigurations> |
| <mappings current="mssqlMapping"> |
| ...some field mappings |
| </mappings> |
| </openaccess> |
| </configuration> |
app.config of my executable project
| <?xml version="1.0"?> |
| <configuration> |
| <configSections> |
| <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" /> |
| </configSections> |
| <system.diagnostics> |
| <sources> |
| <source name="DefaultSource" switchName="DefaultSwitch"> |
| <listeners> |
| <add name="FileLog" /> |
| </listeners> |
| </source> |
| </sources> |
| <switches> |
| <add name="DefaultSwitch" value="Information" /> |
| </switches> |
| <sharedListeners> |
| <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter" /> |
| </sharedListeners> |
| </system.diagnostics> |
| <openaccess xmlns="http://www.telerik.com/OpenAccess"> |
| <connections> |
| <connection id="MediaCenterConnection"> |
| <databasename>database2</databasename> |
| <servername>myserver</servername> |
| <integratedSecurity>True</integratedSecurity> |
| <backendconfigurationname>mssqlConfiguration</backendconfigurationname> |
| <reference assemblyname="MediaCenterClasses" configrequired="True"> |
| </reference> |
| </connection> |
| <connection id="GeoDataConnection"> |
| <databasename>database1</databasename> |
| <servername>myserver</servername> |
| <integratedSecurity>True</integratedSecurity> |
| <backendconfigurationname>mssqlConfiguration</backendconfigurationname> |
| <reference assemblyname="GeoDataClasses" configrequired="True"> |
| </reference> |
| </connection> |
| </connections> |
| <backendconfigurations> |
| <backendconfiguration id="mssqlConfiguration" backend="mssql" driver="ntds"> |
| <mappingname>mssqlMapping</mappingname> |
| </backendconfiguration> |
| </backendconfigurations> |
| <mappings current="mssqlMapping"> |
| <mapping id="mssqlMapping" /> |
| </mappings> |
| </openaccess> |
| </configuration> |
As soon as i load the scopes i get the following error message:
| Private Sub Load_Scope() |
| If m_scope_MediaCenter Is Nothing Then |
| m_scope_MediaCenter = Database.Get("MediaCenterConnection").GetObjectScope() |
| End If |
| If m_scope_GeoData Is Nothing Then |
| m_scope_GeoData = Database.Get("GeoDataConnection").GetObjectScope() |
| End If |
| End Sub |
Any help would be really appreciated.
Thanks.