Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbMetal can't resolve databaseconnectiontype for mysql #212

Open
GoogleCodeExporter opened this issue Apr 24, 2015 · 5 comments
Open

DbMetal can't resolve databaseconnectiontype for mysql #212

GoogleCodeExporter opened this issue Apr 24, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. dbmetal.exe /provider=mysql

What is the expected output? What do you see instead?
Is is expected that dbMetal can resolve the database connection type mysql

What version of the product are you using? On what operating system?
0.19 on Windows Server 2008 x64

Please provide any additional information below.
DbMetal failed:System.ArgumentException: Unable to resolve
databaseConnectionType: MySql.Data.MySqlClient.MySqlConnection, MySql.Data
   at DbMetal.Generator.Implementation.SchemaLoaderFactory.Load(Parameters
parameters, String dbLinqSchemaLoaderTypeName, String
databaseConnectionTypeName, String sqlDialectTypeName) in
Z:\Development\DbLinq-0.19\src\DbMetal\Generator\Implementation\SchemaLoaderFact
ory.cs:line
151
   at DbMetal.Generator.Implementation.SchemaLoaderFactory.Load(Parameters
parameters) in
Z:\Development\DbLinq-0.19\src\DbMetal\Generator\Implementation\SchemaLoaderFact
ory.cs:line
65
   at DbMetal.Generator.Implementation.Processor.ReadSchema(Parameters
parameters, ISchemaLoader& schemaLoader) in
Z:\Development\DbLinq-0.19\src\DbMetal\Generator\Implementation\Processor.cs:lin
e
216
   at DbMetal.Generator.Implementation.Processor.ProcessSchema(Parameters
parameters) in
Z:\Development\DbLinq-0.19\src\DbMetal\Generator\Implementation\Processor.cs:lin
e
116

Original issue reported on code.google.com by Rasmus.C...@gmail.com on 15 Mar 2010 at 2:26

@GoogleCodeExporter
Copy link
Author

You need to have MySql.Data.dll in the same directory as DbMetal.exe.

Alternatively, you need to edit DbMetal.exe.config to contain the full assembly-
qualified type name for the MySQL provider.

If you're running from the `build` directory after building with MSBuild and/or 
Visual Studio, then there should be a MySql.Data.dll in the same directory as 
DbMetal.exe.  (If not, you can copy the one from the `lib` directory).  
Otherwise, 
you need to ensure that when you copy DbMetal.exe to an "alternate" directory 
that 
you ALSO copy all the "dependent" files (DbMetal.exe.config, DbLinq.MySql.dll, 
MySql.Data.dll, possibly others).

Where are you running DbMetal.exe from, and does that directory contain the 
necessary 
files?

Original comment by jonmpr...@gmail.com on 15 Mar 2010 at 8:48

  • Changed state: StandBy
  • Added labels: Component-MySQL, Priority-Low, Type-Defect

@GoogleCodeExporter
Copy link
Author

I downloaded DbLinq-0.19 directly from the website, unzipped it to a folder on 
the
desktop and made a bat file.

The files in the directory are as follows:
 Volume in drive C has no label.
 Volume Serial Number is DCD2-04CF

 Directory of C:\Users\Administrator\Desktop\DbLinq-0.19

16-03-2010  08:07    <DIR>          .
16-03-2010  08:07    <DIR>          ..
15-03-2010  14:35           374.272 DbLinq.dll
15-03-2010  14:35            27.136 DbLinq.Firebird.dll
15-03-2010  14:35            42.496 DbLinq.Firebird.pdb
15-03-2010  14:35            22.528 DbLinq.Ingres.dll
15-03-2010  14:35            38.400 DbLinq.Ingres.pdb
15-03-2010  14:35            19.968 DbLinq.MySql.dll
15-03-2010  14:35            38.400 DbLinq.MySql.pdb
15-03-2010  14:35            20.992 DbLinq.Oracle.dll
15-03-2010  14:35            38.400 DbLinq.Oracle.pdb
15-03-2010  14:35           988.672 DbLinq.pdb
15-03-2010  14:35            25.088 DbLinq.PostgreSql.dll
15-03-2010  14:35            44.544 DbLinq.PostgreSql.pdb
15-03-2010  14:35            15.872 DbLinq.Sqlite.dll
15-03-2010  14:35            34.304 DbLinq.Sqlite.pdb
15-03-2010  14:35            21.504 DbLinq.SqlServer.dll
15-03-2010  14:35            34.304 DbLinq.SqlServer.pdb
15-03-2010  14:35         4.896.768 DbMetal.exe
15-03-2010  14:35             2.874 DbMetal.exe.config
15-03-2010  14:35           251.392 DbMetal.pdb
16-03-2010  08:07                 0 dirlist.txt
15-03-2010  15:24               194 RunDbMetal.bat
              21 File(s)      6.938.108 bytes
               2 Dir(s)  44.936.273.920 bytes free

As you can see there is no MySql.Data.dll as it was not in the zipfile, and I 
have
found no tutorial or description of how to use DBMetal that explains that I 
should
have downloaded that file in order to get it work. Maybe these kind of 
exceptions
should be caught and an more descriptive/suggesting error message should be 
shown to
the user, just a suggestion.

I have d/l the needed ddl file but is now getting another error, but that 
properly
have to do with security restrictions at my current location. I'll try later 
on. This
issue can be closed, but you should think about writing an article or tutorial 
of how
to use DbLinq/DbMetal in step by step with all requirements listed so anyone can
figure it out :-)

Original comment by Rasmus.C...@gmail.com on 16 Mar 2010 at 7:20

@GoogleCodeExporter
Copy link
Author

I obviously need to write some documentation... :-/

Regardless, the logic is this:

    http://groups.google.com/group/dblinq/msg/2981c81492fcf32a

The binary .zip doesn't contain MySql.Data.dll (or any other ADO.NET 
providers); you 
need to provide them, as (presumably) you have a valid license to the DB that 
you'll 
be using and a pre-existing set of ADO.NET providers.  Just drop them into the 
same 
directory as DbMetal.exe and things should (hopefully) Just Work.

Original comment by jonmpr...@gmail.com on 16 Mar 2010 at 1:15

@GoogleCodeExporter
Copy link
Author

And behold, some documentation: 
http://code.google.com/p/dblinq2007/wiki/Installation

If that needs any clarification, please let me know so that I can fix it.

Thanks!

Original comment by jonmpr...@gmail.com on 16 Mar 2010 at 7:32

  • Changed state: Resolved

@GoogleCodeExporter
Copy link
Author

Thanks for your help.

Original comment by ccha...@gmail.com on 8 May 2010 at 7:25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant