I have just downloaded and installed the most recent version of dotConnect for MySQL 8.7 Express.
Everything works fine when I use a connection string with providerName="Devart.Data.MySql" except that the "initial catalog" keyword is not supported (throwing a System.NotSupportedException).
This seems reminiscent of this bug: viewtopic.php?f=4&t=29641&sid=5d61f880a ... 2f09168468 .
(I am currently using Visual Studio 2015 and a .NET 4.5 project.)
Keyword not supported: 'initial catalog'
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Keyword not supported: 'initial catalog'
dotConnect for MySQL does not have such a connection string parameter as "initial catalog". The "initial catalog" connection string parameter is used in SQL Server provider. Probably you have copied an SQL Server connection string and rewritten it for MySQL. Try replacing the "initial catalog" connection string parameter with "database". For more information, please refer to https://www.devart.com/dotconnect/mysql ... tring.html
-
- Posts: 4
- Joined: Tue 28 Feb 2017 10:26
Re: Keyword not supported: 'initial catalog'
Ah, thank you for the quick feedback, and "database=" does work fine for me, which is most of what I needed.
However...
My problem was more interesting than that, because I had first of all ported a SQL Server project to the Oracle/MySQL ADO.NET driver, and this DOES support "initial catalog=" as an alias for "database=", so I didn't notice anything and just carried on using it.
Then I wanted to see if my ported project would work with the Devart driver, which as you rightly say doesn't support "initial catalog=". But since my project was working on Oracle/MySQL and then stopped working fully when I switched to Devart, you can hopefully see why this looked to me (and might look to someone else...?) like it was a problem with the Devart driver.
Might it possibly even be an idea for you to support "initial catalog=" as an alias for "database=", because the Oracle/MySQL driver does?
(I have just tested, and they both support "database=" of course.)
However...
My problem was more interesting than that, because I had first of all ported a SQL Server project to the Oracle/MySQL ADO.NET driver, and this DOES support "initial catalog=" as an alias for "database=", so I didn't notice anything and just carried on using it.
Then I wanted to see if my ported project would work with the Devart driver, which as you rightly say doesn't support "initial catalog=". But since my project was working on Oracle/MySQL and then stopped working fully when I switched to Devart, you can hopefully see why this looked to me (and might look to someone else...?) like it was a problem with the Devart driver.
Might it possibly even be an idea for you to support "initial catalog=" as an alias for "database=", because the Oracle/MySQL driver does?
(I have just tested, and they both support "database=" of course.)
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Keyword not supported: 'initial catalog'
We will investigate the possibility to implement "Initial Catalog" connection string parameter as an alias to "database" connection string parameter in MySqlConnection.MikeBeaton wrote:Might it possibly even be an idea for you to support "initial catalog=" as an alias for "database=", because the Oracle/MySQL driver does?
As for dotConnect for Oracle, there is neither "Initial Catalog" nor "database" parameter in a connection string.
-
- Posts: 4
- Joined: Tue 28 Feb 2017 10:26
Re: Keyword not supported: 'initial catalog'
True.
And Npgsql for PostgreSQL supports "database=" but not "initial catalog=".
But SQL Server actually supports "database=" as well as "initial catalog=".
And then for MySQL, Oracle/MySQL supports both, and yourselves only support "database="
Supporting both seems the 'friendliest'!
I agree it's not urgent and your documentation and current operation is completely correct.
And Npgsql for PostgreSQL supports "database=" but not "initial catalog=".
But SQL Server actually supports "database=" as well as "initial catalog=".
And then for MySQL, Oracle/MySQL supports both, and yourselves only support "database="
Supporting both seems the 'friendliest'!
I agree it's not urgent and your documentation and current operation is completely correct.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Keyword not supported: 'initial catalog'
We have added the "Initial Catalog" connection string parameter to MySqlConnection as an alias to the "Database" connection string parameter. We will post here when the corresponding build of dotConnect for MySQL is available for download.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Keyword not supported: 'initial catalog'
New version of dotConnect for MySQL 8.8 is released.
It can be downloaded from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to viewtopic.php?t=35128
It can be downloaded from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to viewtopic.php?t=35128