<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Error Connecting to Sql anywhere database from entity framework 6 in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829720#M4860563</link>
    <description>&lt;P&gt;Your web.config file snippet looks OK except:&lt;/P&gt;
&lt;P&gt;Remove the SqlClient entry if you don't need it.&lt;/P&gt;
&lt;P&gt;Use exact case for keywords in your app config file (yes, it is case-sensitive!). For example, entityframework =&amp;gt; entityFramework, invariantname =&amp;gt; invariantName, etc.&lt;/P&gt;
&lt;P&gt;One thing to note.  It looks like you have both 16.0 and 17.0 providers installed. Only one provider can be used with Visual Studio, and that is the last one you installed with SetupVSPackage. I usually avoid confusion by running the following at an administrator Command Prompt ...&lt;/P&gt;
&lt;P&gt;SetupVSPackage /ua&lt;/P&gt;
&lt;P&gt;SetupVSPackage /i /v ef6&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2016 12:53:55 GMT</pubDate>
    <dc:creator>jack_schueler</dc:creator>
    <dc:date>2016-07-28T12:53:55Z</dc:date>
    <item>
      <title>Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaq-p/13829715</link>
      <description>&lt;P&gt;I am getting below error connecting to sql anywhere database from entity framework 6
Schema specified is not valid. Errors: 
Model11.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'Sap.Data.SQLAnywhere'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See &lt;A href="http://go.microsoft.com/fwlink/?LinkId=260882" target="_blank"&gt;http://go.microsoft.com/fwlink/?LinkId=260882&lt;/A&gt; for more information.&lt;/P&gt;
&lt;P&gt;I have added the provider in web.config as,&lt;/P&gt;
&lt;PRE&gt; &amp;lt;entityframework&amp;gt;
    &amp;lt;defaultconnectionfactory type="Sap.Data.SQLAnywhere.SAConnectionFactory, Sap.Data.SQLAnywhere.EF6, Version=17.0.4.20534, Culture=neutral, PublicKeyToken=f222fc4333e0d400"&amp;gt;
    &amp;lt;/defaultconnectionfactory&amp;gt;
    &amp;lt;providers&amp;gt;
      &amp;lt;provider invariantname="Sap.Data.SQLAnywhere" type="Sap.Data.SQLAnywhere.SAProviderServices, Sap.Data.SQLAnywhere.EF6, Version=17.0.4.20534, Culture=neutral, PublicKeyToken=f222fc4333e0d400"/&amp;gt;
      &amp;lt;provider invariantname="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/&amp;gt;
    &amp;lt;/providers&amp;gt;
  &amp;lt;/entityframework&amp;gt;
  &amp;lt;connectionstrings&amp;gt;
    &amp;lt;add name="Entities1" connectionstring="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Sap.Data.SQLAnywhere;provider connection string="UserID=dba;Password=sql;DataSourceName=WebPortalSybase17"" providername="System.Data.EntityClient"/&amp;gt;
  &amp;lt;/connectionstrings&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 17:17:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaq-p/13829715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-27T17:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829716#M4860559</link>
      <description>&lt;P&gt;That sounds like the provider has just not been &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/815bcac16ce210149887de04eabb7343.html"&gt;registered correctly&lt;/A&gt; on that machine yet.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 18:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829716#M4860559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-27T18:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829717#M4860560</link>
      <description>&lt;P&gt;I have registered the providers using %SQLANY17%\\Assembly\\v4.5\\SetupVSPackage.exe /install.I am able to add .edmx file with stored procedure from sybase database but when i call it Getting above error.I have entry in machine.config for sql anywhere as,
&amp;lt;add name="SQL Anywhere 17 Data Provider" invariant="Sap.Data.SQLAnywhere" description=".NET Framework Data Provider for SQL Anywhere 17" type="Sap.Data.SQLAnywhere.SAFactory, Sap.Data.SQLAnywhere.v4.5, Version=17.0.4.20534, Culture=neutral, PublicKeyToken=f222fc4333e0d400"/&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 18:39:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829717#M4860560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-27T18:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829718#M4860561</link>
      <description>&lt;P&gt;The EF6 framework requires an additional &lt;EM&gt;'version to install'&lt;/EM&gt; switch when running SetupVSPackage.exe:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/37fb9e8558e94547b66156b9298be16f.html"&gt;SetupVSPackage.exe /i /v EF6&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;That DCX article &lt;EM&gt;(see link)&lt;/EM&gt; also shows how to set this up in your app.config. You will want to compare your changes to that. &lt;/P&gt;
&lt;P&gt;Some of the config entries are required by Visual Studio. Some are for the .NetFramework ... &lt;STRONG&gt;&lt;EM&gt;I noticed&lt;/EM&gt;&lt;/STRONG&gt; your machine.config 'provider' addition was not identified as being part of a &amp;lt;system.data&amp;gt;, &amp;lt;dbproviderfactories&amp;gt; sections. If a DbProviderFactories is missing or the provider is not identified for that purpose, that may be a reason for the EF6 'lookup' to fail the way you are seeing.&lt;/P&gt;
&lt;P&gt;At this moment I'm not exactly certain which 'layer' is throwing your error but it feels like the factory is the one that is failing to find the correct provider.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:20:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829718#M4860561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-28T09:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829719#M4860562</link>
      <description>&lt;P&gt;Machine config does contain the the entry for DbProviderFactories  as&lt;/P&gt;
&lt;PRE&gt;&amp;lt;system.data&amp;gt;
    &amp;lt;dbproviderfactories&amp;gt;
      &amp;lt;add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc9`enter code here`1"/&amp;gt;
      &amp;lt;add invariant="iAnywhere.Data.UltraLite" name="SQL Anywhere UltraLite.NET 12 Data Provider" description=".Net Framework Data Provider for SQL Anywhere UltraLite.NET 12" type="iAnywhere.Data.UltraLite.ULFactory, iAnywhere.Data.UltraLite,  Version=12.0.0.2483, Culture=neutral, PublicKeyToken=ff11483eb5a8c1a5"/&amp;gt;
      &amp;lt;add name="SQL Anywhere 16 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 16" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v4.5, Version=16.0.0.20434, Culture=neutral, PublicKeyToken=f222fc4333e0d400"/&amp;gt;
      &amp;lt;add name="SQL Anywhere 17 Data Provider" invariant="Sap.Data.SQLAnywhere" description=".NET Framework Data Provider for SQL Anywhere 17" type="Sap.Data.SQLAnywhere.SAFactory, Sap.Data.SQLAnywhere.EF6, Version=17.0.4.20534, Culture=neutral, PublicKeyToken=f222fc4333e0d400"/&amp;gt;
    &amp;lt;/dbproviderfactories&amp;gt;
  &amp;lt;/system.data&amp;gt;
&lt;/PRE&gt;

&lt;P&gt;and also i had followed the process suggested by you like executing "SetupVSPackage.exe /i /v EF6" command.
I am still not able to execute the procedure through .edmx. I wonder how it does allow me to add the .edmx with sql anywhere 17 driver but at the time of query execution it does give me the error for provider.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 11:21:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829719#M4860562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-28T11:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829720#M4860563</link>
      <description>&lt;P&gt;Your web.config file snippet looks OK except:&lt;/P&gt;
&lt;P&gt;Remove the SqlClient entry if you don't need it.&lt;/P&gt;
&lt;P&gt;Use exact case for keywords in your app config file (yes, it is case-sensitive!). For example, entityframework =&amp;gt; entityFramework, invariantname =&amp;gt; invariantName, etc.&lt;/P&gt;
&lt;P&gt;One thing to note.  It looks like you have both 16.0 and 17.0 providers installed. Only one provider can be used with Visual Studio, and that is the last one you installed with SetupVSPackage. I usually avoid confusion by running the following at an administrator Command Prompt ...&lt;/P&gt;
&lt;P&gt;SetupVSPackage /ua&lt;/P&gt;
&lt;P&gt;SetupVSPackage /i /v ef6&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 12:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829720#M4860563</guid>
      <dc:creator>jack_schueler</dc:creator>
      <dc:date>2016-07-28T12:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error Connecting to Sql anywhere database from entity framework 6</title>
      <link>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829721#M4860564</link>
      <description>&lt;P&gt;uninstalled 16.0 providers and also have correct case sensitive names in web.config still giving error.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 15:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-connecting-to-sql-anywhere-database-from-entity-framework-6/qaa-p/13829721#M4860564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-07-28T15:53:07Z</dc:date>
    </item>
  </channel>
</rss>

