5

I'm creating and WPF application using the MVVM in VS 2013; first implementation was with SQL server and it worked like a charm.

Second phase is to have support for Advantage Sybase. For this I have downloaded Advantage Data Provier to have the connection in connection drop down list ( http://www.codeguru.com/csharp/.net/article.php/c17027/Using-the-ADONET-Entity-Framework-with-the-Advantage-Database-Server.htm ).

For VS 2013 there is a problem with this and the workaround is to manually edit the registry to have this provider (http://blog.nwoolls.com/2012/07/25/registering-missing-data-providers-with-visual-studio-2012/).

Now I have the provider in the drop down, I can select the provider, but when I try to generate the script for data base generation I have a weird error:

ERROR: " Could not find the appropriate DbProviderManifest to generate the SSDL. The supplied provider Manifest token '2008' is not valid. "

Any ideas on how to use the DB Provider correctly?

Philip Pittle
  • 11,821
  • 8
  • 59
  • 123
dragosT
  • 51
  • 1
  • 3

1 Answers1

1

First, VS 2013 is not yet officially supported by Advantage Database Server. I believe official support may be available once ADS 12.0 is released.

But.... I did get a chance to try it out and it is working.

Be sure to that you are using the 11.1 ADS .Net dataprovider. It includes support for Entity Framework 5 (As far as In know, nothing from ADS includes support for EF6 at this time)

Export the 4 keys mentioned in your second article from Nate Wools. In my case I exported from VS 2012 (11.0 in the registry path). Full find/replace on 11.0 -> 12.0 including the assembly version for Microsoft.VisualStudio.Data.Framework

(Disclaimer, I've not had a chance to try MVVM, just a plain Windows Form app, but it worked well)

App.Config that was automatically created and updated. Maybe check against yours?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
  </startup>
  <connectionStrings>
    <add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Advantage.Data.Provider;provider connection string=&quot;Data Source=E:\ADS\School\School.add;User ID=adssys&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>
Edgar
  • 943
  • 4
  • 4
  • Thank you for your feedback. Indeed I'm using EF6, I will change to 5 and give a try. – dragosT Aug 13 '14 at 17:20
  • Hey Edgar, I've tried also with a plain Windows Form, EF5 and ADP 11.10; indeed now is trying to generate the database script, but still in error: Running transformation: System.InvalidOperationException: The SSDL generated by the activity called 'CsdlToSsdlAndMslActivity' is not valid and has the following errors: No Entity Framework provider found for the ADO.NET provider with invariant name 'Advantage.Data.Provider'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. – dragosT Aug 13 '14 at 18:45
  • I'm using EF5, Is giving me an warning that I'm using EF5 and I need to upgrade to latest; so it isn't EF6 even if the link is giving me the reference to EF6. Any idea? – dragosT Aug 13 '14 at 18:47
  • Hmm, not sure. I just created a new project (.net 4.5) and then added a new ADS.Net Entity Data Model and it worked. I see it added a number of lines to my local app.config. I'll edit my answer with what was added. No idea where it was picked up from. – Edgar Aug 13 '14 at 22:14
  • Thanks Edgar, still have problems, maybe i did something wrong while doing these steps; I will try all over again...maybe something was lost on the way. – dragosT Aug 27 '14 at 20:16