This is a migrated thread and some comments may be shown as answers.

Using vistaDB4 with version DA 2014.1.225.2

6 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 2
Rob asked on 09 Apr 2014, 03:26 AM
HI,
Just installed the latest (full) version of Data Access (2014.1.225.2).  The version release notes (www.telerik.com/support/whats-new/data-access/release-history/q1-2014) read:
Support for VistaDB 5.0 - Telerik Data Access supports VistaDB 5.0 now. If the VistaDB driver is not registered in the provider factories, Telerik Data Access will fallback to the 5.0 versions of VistaDB. If the application is running in a 4.0 .NET VM, the VistaDB.5.NET40.dll is used if not the VistaDB.5.NET20.dll.

I need to use vistaDB4 until 5 testing is complete however my .net 4.0 website works fine with VistaDB4 (and DA 2014.1.225.2) locally BUT not when it is deployed. It then defaults to VistaDB5 and returns an error message:
System.Configuration.ConfigurationErrorsException: Database provider VistaDB.Provider.VistaDBProviderFactory, VistaDB.5.NET40, Version=5.0.0.0, Culture=neutral, PublicKeyToken=dfc935afe2125461 not installed properly (CLR=v4.0.30319 64bit). ---> System.IO.FileNotFoundException: Could not load file or assembly 'VistaDB.5.NET40, Version=5.0.0.0, Culture=neutral, PublicKeyToken=dfc935afe2125461' or one of its dependencies. The system cannot find the file specified. at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.Type.GetType(String typeName, Boolean throwOnError) at OpenAccessRuntime.ProviderFactoryLoader.LoadImpl(String name, LogEventStore log, Int32 id) --- End of inner exception stack trace --- at OpenAccessRuntime.ProviderFactoryLoader.LoadImpl(String name, LogEventStore log, Int32 id) at OpenAccessRuntime.Relational.RelationalStorageManagerFactory..ctor(StorageManagerFactoryBuilder b) at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()

If I include VistaDB.5.NET40 in the bin folder I get errors saying the the database needs updating to version 5. 

Can someone please show me what to get the latest version of DA working with vistaDB4? How do I register it in the provider factories, as suggested above???
Many thanks
Rob 

6 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 09 Apr 2014, 08:04 AM
Hi Rob,

There is a nice article about the same issue with SqLite. Please have a look here:

3 ways to use the SQLite NuGet with Telerik Data Access

Regards,
Jan Blessenohl
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Rob
Top achievements
Rank 2
answered on 09 Apr 2014, 09:41 AM
Many thanks Jan. For others, this is the code that worked:

 <connectionStrings>
    <add name="PoiConnection" connectionString="data source=|DataDirectory|\site.vdb4; Open Mode = NonexclusiveReadWrite" providerName="System.Data.VistaDB" />
</connectionStrings> 

<system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.VistaDB5" />
      <add invariant="System.Data.VistaDB" name="VistaDB 4 Data Provider"
           description="VistaDB 4 ADO.NET Provider for .Net"
            type="VistaDB.Provider.VistaDBProviderFactory, VistaDB.4" />
    </DbProviderFactories>
  </system.data> 

Thanks again for your help.
Cheers
Rob
0
Jan Blessenohl
Telerik team
answered on 09 Apr 2014, 12:43 PM
Hello Rob,
This is indeed missing functionality, we will fix it for the next release (sorry, not todays).

You can specfiy the connection string after choosing 'Set Manual Manually' in the second screen of the wizard.

Hope that helps,
Jan Blessenohl
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Jan Blessenohl
Telerik team
answered on 09 Apr 2014, 12:59 PM
Hello,
Sorry, right answer to wrong post, pls. ignore my last answer.

Regards,
Jan Blessenohl
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Rob
Top achievements
Rank 2
answered on 10 Apr 2014, 01:39 AM
Thanks Jan, I very much appreciate your efforts.

FYI, This was sent to me by Gilbraltar (may be of some help to others):

When they talk about a provider factory they're talking about registering the ADO.NET provider factory.  What you want to do is make one of these entries:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.VistaDB5" />
      <add invariant="System.Data.VistaDB5" name="VistaDB 5 Data Provider"
           description="VistaDB 5 ADO.NET Provider for .Net"
            type="VistaDB.Provider.VistaDBProviderFactory, VistaDB.5.NET40" />
    </DbProviderFactories>
  </system.data>
</configuration>

Now in your case you'll want to specify VistaDB 4. So the key there is to change it at least like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <connectionStrings>
    <add name="YourAppConnection"
         connectionString="Data Source='|DataDirectory|\Database.vdb5'"
         providerName="System.Data.VistaDB5" />
  </connectionStrings>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.VistaDB5" />
      <add invariant="System.Data.VistaDB5" name="VistaDB 5 Data Provider"
           description="VistaDB 5 ADO.NET Provider for .Net"
            type="VistaDB.Provider.VistaDBProviderFactory, VistaDB.4" />
    </DbProviderFactories>
  </system.data>
</configuration>

Or more correctly (as it was in VistaDB 4)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <connectionStrings>
    <add name="YourAppConnection"
         connectionString="Data Source='|DataDirectory|\Database.vdb5'"
         providerName="System.Data.VistaDB5" />
  </connectionStrings>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.VistaDB" />
      <add invariant="System.Data.VistaDB" name="VistaDB 5 Data Provider"
           description="VistaDB ADO.NET Provider for .Net"
            type="VistaDB.Provider.VistaDBProviderFactory, VistaDB.4" />
    </DbProviderFactories>
  </system.data>
</configuration>

Cheers
Rob

0
Dennis
Top achievements
Rank 2
answered on 27 Jul 2014, 09:06 PM
Rob --

Thanks for posting the solution to this.  I just ran into the same issue when deploying a web application for testing and your solution worked perfectly!!!

Thanks again,
Dennis
Tags
General Discussions
Asked by
Rob
Top achievements
Rank 2
Answers by
Jan Blessenohl
Telerik team
Rob
Top achievements
Rank 2
Dennis
Top achievements
Rank 2
Share this question
or