cancel
Showing results for 
Search instead for 
Did you mean: 

Integration of SQL Anywhere 16 into Visual Studio 2013

Former Member
0 Kudos

Hi

I'm trying to use Visual Studio 2013 to create an entity model with Entity Framework 6 and I just can't get the SQL Anywhere driver into list of drivers, so I can't choose it for connection. I tried to follow instructions from http://sqlanywhere-forum.sap.com/questions/22161/entity-framework-6-provider  and also from SQLA17 documentation as closely as possible - with no luck. Some details:

SQL Anywhere 16.0.0.2178, both 32-bit and 64-bit installed.

Visual Studio Express Edition Update 5

Entity Framework 6.1.3

Output from the run of SetupVSPackage.exe:

C:\Program Files\SQL Anywhere 16\Assembly\V4>SetupVSPackage.exe /i /v EF6

SQL Anywhere Package for Visual Studio .NET Setup Utility Version 16.0.0.21784

Copyright (c) 2015 SAP SE or an SAP affiliate company. All rights reserved.

Installing SQL Anywhere Package for Visual Studio 2010......

Succeeded

Replaced part of Web.config:


  <entityFramework>

  <defaultConnectionFactory type="iAnywhere.Data.SQLAnywhere.SAConnectionFactory, Sap.Data.SQLAnywhere.EF6, Version=16.0.0.21784, Culture=neutral, PublicKeyToken=f222fc4333e0d400">

  </defaultConnectionFactory>

    <providers>

      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />

      <provider invariantName="iAnywhere.Data.SQLAnywhere" type="iAnywhere.Data.SQLAnywhere.SAProviderServices, iAnywhere.Data.SQLAnywhere.EF6, Version=16.0.0.21784, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />

    </providers>

  </entityFramework>

After all this, I still see only SQL Server drivers in the list when I try to add ADO.NET Entity Data Model.

Thanks in advance

Leonid Gvirtz

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Leonid,

In your machine.config file, which should be located in C:\Windows\Microsft.NET\Framework\v4.0...\CONFIG, do you see an

entry in <DbproviderFactories> having SQL Anywhere Data Provider registered?

Former Member
0 Kudos

Hi

It seems that SQL Anywhere Data Provider is registered.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config contains following fragment:


  <system.data>

    <DbProviderFactories>

      <add name="Sybase Adaptive Server Enterprise Data Provider" invariant="Sybase.Data.AseClient" description=".NET Framework Data Provider for Sybase Adaptive Server Enterprise" type="Sybase.Data.AseClient.AseClientFactory, Sybase.AdoNet4.AseClient, Version=4.157.1212.0, Culture=neutral, PublicKeyToken=95d94fac46c88e1e" />

      <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=89845dcd8080cc91" />

      <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.EF6, Version=16.0.0.21784, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />

    </DbProviderFactories>

  </system.data>

It should be noted that a simple ADO.NET sample that comes with SQL Anywhere works OK, so the provider itself is pretty much usable. The problem is with adding of an entity model based on SQL Anywhere. The SQL Anywhere .NET provider just doesn't appear in the list of providers for this specific purpose.

Thanks

Leonid Gvirtz