DatabaseFactory.CreateDatabase() fails

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Platypus
Posts: 4
Joined: Mon 26 Oct 2009 02:38
Location: Brisbane QLD

DatabaseFactory.CreateDatabase() fails

Post by Platypus » Mon 26 Oct 2009 04:47

I am using VS2008 with MS enterprise library 1.1 with a target framework of 2.0 and am having a problem with the the call to DatabaseFactory.CreateDatabase(). Although elsewhere in this site it suggests that only the app.config file is required, when I use only this file it fails with a dataconfiguration section not found. I have instead used an app.config and a dataConfiguration.config file to setup the database information required. This works until the create database call at which stage the following error occurrs:-

{"Could not load file or assembly 'Devart.Data, Version=5.40.42.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Devart.Data, Version=5.40.42.0, Culture=neutral, PublicKeyToken=09af7300eec23701"}

Can someone please explain what is required to correct this, thanks.

The app.config is

Code: Select all

  
    
  
  
    
      
        
        
          
        
      
    
    
    
  
The dataconfiguration.config is

Code: Select all


  
    
      
        
        
        
      
      
        
        
      
      
        
          
            
            
            
            
            
          
        
        
          
            
            
            
            
            
          
        
       
    
  

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 28 Oct 2009 11:48

1. Try rebuilding Devart.Data.MySql.EnterpriseLibrary.dll by compiling \Program Files\Devart\dotConnect\MySQL\Enterprise Library\src\CS\Devart.Data.MySql.EnterpriseLibrary.8.sln .
2. Please put the dataConfiguration section to your app.config file as it is described in our sample in \Program Files\Devart\dotConnect\MySQL\Enterprise Library\DataAccessQuickStart\CS\App.config .
3. Tell us your current version of dotConnect for MySQL. You can learn it from the Tools | MySQL | About menu of Visual Studio.
4. Please check our provider registration in \WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config . If you current version is 5.40.42, the corresponding entry should be the following:

Code: Select all

  
    
  
5. Make sure that Devart.Data.dll is available in GAC or in the bin folder of your application.

Platypus
Posts: 4
Joined: Mon 26 Oct 2009 02:38
Location: Brisbane QLD

Post by Platypus » Thu 29 Oct 2009 04:13

Points 4 & 5 are already okay and the version is 5.40.42.0.
Point 1 is the problem. I do not have the enterprise library folder present on my machine. I have reinstalled Devart dotConnect for MySQL Standard with full installation but still no enterprise library folder. I have these folders under MySQL:

Code: Select all

C:\Program Files\Devart\dotConnect\MySQL\Doc
C:\Program Files\Devart\dotConnect\MySQL\HTTP
C:\Program Files\Devart\dotConnect\MySQL\Samples
C:\Program Files\Devart\dotConnect\MySQL\Uninstall
How do I get the source files you are referring to?
Thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 29 Oct 2009 08:18

Please refer to the dotConnect for MySQL editions matrix available at http://www.devart.com/dotconnect/mysql/editions.html . Please note that Enterprise Library is supported in the Professional and Developer editions only. Probably, you have Standard Edition. You can check this in the Tools | MySQL | About menu of Visual Studio.

Platypus
Posts: 4
Joined: Mon 26 Oct 2009 02:38
Location: Brisbane QLD

Post by Platypus » Fri 30 Oct 2009 04:31

I have ordered an upgrade to the professional version. Will see how that works out. The link to the enterprise library feature from the editions page is broken & perhaps that is why I didn't bother to order it in the first place. Thanks

Platypus
Posts: 4
Joined: Mon 26 Oct 2009 02:38
Location: Brisbane QLD

Post by Platypus » Wed 04 Nov 2009 08:22

I have installed the professional version but it has highlighted other problems. I think that upgrading from .Net 1.1 to 2 or more requires me to change a lot of source code for this to work correctly, something I don't have time to do at present.

Post Reply