%VOSWARNING% %META:TOPICPARENT{name="VirtAdoNet35Provider"}% ---+ Using Microsoft Entity Frameworks to Access Remote ODBC-accessible Schema Objects with Virtuoso, via an ODBC-to-ODBC Bridge This document details the steps required to provide Microsoft Entity Framework access to remote ODBC-accessible Schema Objects using the OpenLink Virtuoso Universal Server. This is achieved by linking the remote Schema Objects into Virtuoso using its built-in Virtual Database engine, through an ODBC-to-ODBC Bridge, and then using the Virtuoso ADO.NET Entity Framework provider to query the remote Schema Objects linked into the Virtuoso Server. %TOC% ---++ Prerequisites The following must be in place to complete this exercise. 1 Microsoft Visual Studio 2008 SP1 (or later)%BR% Microsoft Visual Studio 2008 Service Pack 1 (or later) is required, as previous versions do not include the necessary Entity Framework support.%BR%%BR% 1 Virtuoso ADO.NET Entity Framework Provider, v5.10 or later%BR% The ADO.NET Entity Framework Provider must be installed on the Visual Studio development and deployment host(s). Version 5.10.x or later is required, as previous versions do not include the necessary Entity Frameworks support.%BR%%BR% 1 Virtuoso Universal Server, v5.10 or later%BR% Virtuoso Universal Server Release 5.10 or later is required, as previous versions do not include the necessary Entity Frameworks support. This may be on any host which is TCP/IP accessible from the Visual Studio development and deployment host(s).%BR%%BR% 1 ODBC Driver for ODBC Data Sources, also known as an ODBC-to-ODBC Bridge%BR% The Virtuoso Server uses a network-enabled ODBC-to-ODBC Bridge to link in the non-networked ODBC-accessible Schema Objects. The OpenLink Multi-Tier ODBC Driver for ODBC Data Sources will be used in this document, and a functional ODBC Data Source Name (DSN) of "odbcma" will be assumed to exist on the machine hosting the Virtuoso Server. Any network-enabled ODBC compliant driver for non-networked ODBC data sources should work.%BR%%BR% 1 ODBC-accessible DBMS and its associated ODBC Driver%BR% A ODBC-accessible DBMS hosting the required Schema Objects needs to be available, and a ODBC Driver for same must be available to the ODBC-to-ODBC Bridge. Specific requirements depend on the target DBMS, the ODBC driver, and the ODBC-to-ODBC Bridge. In this document, a remote Microsoft Access Northwind database will be used to demonstrate the process, through the Microsoft ODBC Driver for Access.%BR%%BR% ---++ Tasks 1 Ensure ODBC-accessible DBMS Primary Keys (PKs) are not nullable%BR% The Visual Studio 2008 Entity Data Model (EDM) requires that all primary keys are *NOT* Nullable. Visual Studio 2008 will fail to generate an EDM if any are. Therefore, ensure any primary keys to be used are defined as not nullable in the ODBC-accessible database schema before attempting to generate an EDM. In the case of the Microsoft Access Northwind database, all primary keys are non nullable. Thus, this should not be an issue.%BR%%BR% 1 [[http://wikis.openlinksw.com/dataspace/owiki/wiki/UdaWikiWeb/InstallConfigODBC][Install and configure the OpenLink ODBC Driver for ODBC Data Sources]]%BR%%BR% 1 [[VirtADOClientServInstall][Install and configure OpenLink Virtuoso Universal Server]]%BR%%BR% 1 [[VirtOODBCLinkingObjects][Link ODBC-accessible tables and other schema objects into OpenLink Virtuoso]]%BR%%BR% 1 [[VirtOODBCEDM][Create a Visual Studio-hosted Entity Data Model (EDM)]]%BR%%BR%If entity-linking associations (i.e., Foreign Keys) are not automatically created (as they are not here with Access), the [[VirtOODBCAssociations][associations must be created manually]].%BR%%BR% 1 [[VirtEntityFrameworkOODBCDatService][Use the EDM to create an Entity Frameworks-based ADO.NET Data Service]]%BR%%BR% 1 [[VirtODBCVisualStudioDataGridFormsApp][Use the EDM to create an Entity Frameworks-based Windows DataGrid Form Application]]%BR% CategoryDocumentation CategoryVirtuoso CategoryEntityFrameworks CategoryDotNET CategoryODBC CategoryODBCODBCBridge