Bug #66880 Keyword not supported. Parameter name: AttachDbFilename.
Submitted: 19 Sep 2012 21:05 Modified: 8 Mar 2013 19:32
Reporter: Wolfgang Kleinschmit Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.6.2 beta OS:Windows (VisualStudio 2012)
Assigned to: Gabriela Martinez Sanchez CPU Architecture:Any
Tags: 6.6.2 VisualStudio 2012, Visual Studio Integration.

[19 Sep 2012 21:05] Wolfgang Kleinschmit
Description:
I am trying to drag a table from the "Server Explorer" onto a newly created DataSet and get the following error:

---8<--------------------------------
Failed to merge object(s).

Keyword not supported.
Parameter name: AttachDbFilename.
---8<--------------------------------

This only seems to happen with a MySQL 5.5 server. I tried the same with a 5.1 and it worked.

How to repeat:
0.: Start VisualStudio 2012 an create a new .NET project of any kind (Console, Windows Forms, etc.)

1.: In the Server Explorer connect to a MySQL 5.1 server, using the ".NET Framework Data Provider for MySQL" (aka: MySQL Connector/NET)
    => The Tables, Views, Stored Procedures, etc. are shown.

2.: Insert a new "DataSet" into your project.
    => The designer for the new DataSet opens.

3.: Drag & Drop any table from the Server Explorer into the Designer.
    => A new Table/TableAdapter pair is created in the DataSet designer.

4.: Repeat 1-3 with a MySQL 5.5 server.
    => Error (see above)

Suggested fix:
None known.
[5 Oct 2012 22:44] Gabriela Martinez Sanchez
Thank you for this bug report.

I tried the same steps you mentioned but didn't get the error. Could you please tell us What are the settings you're using in your connection string?

Thanks in advance.
[6 Oct 2012 7:12] Alessandro Pisani
It also happens to me with both connector 6.6.2 and the latest 6.6.3 connecting to mysql 5.5.10 only with Visual Studio 2012.
i've tested it with two web projects both using strongly types datasets: one works fine while the other one generates the error mentioned in the bug report even if both of them connects to the same database server (while at two different databases).
[6 Oct 2012 7:18] Alessandro Pisani
btw the connection string i'm using is the following:
<add name="connStringName" connectionString="server=serverip;user id=nuser;database=db;password=password;persist security info=True" providerName="MySql.Data.MySqlClient"/>
[6 Oct 2012 10:05] Alessandro Pisani
Gabriela: i've did some more tests with connector 6.6.3:
console/windows app converted from vs2010 needs to have settings (stored in Properties/Settings.settings and Properties/Settings.cs) deleted and recreated (very simple: delete both files from VS WITHOUT removig app.config, then go into Properties -> Settings -> Create new settings) to work properly since it seems the connection string gets corrupted (please note: vs2010 still operates fine without having to recreate settings. pretty weird!)

console/windows app new in vs2012: no problems at all.

web sites (not web apps) converted from vs2010 and new in vs2012: work fine,
solutions containing two or more web sites: break all the web sites. removing additional web sites from the solution leaving only one restores correct functionality for the website. Again: no problems doing the same things in vs2010.

In the end, it seems the bug only occours only when operating in vs2012.
[6 Oct 2012 10:20] Alessandro Pisani
Mhh, it also happens with websites coming from vs2010 or creating a new solution in vs2012 and adding a website created originally with vs2010.
[7 Oct 2012 23:24] Wolfgang Kleinschmit
The connection in my Server Explorer has the following properties:

Connection String: server=89.163.167.250;User Id=root;Persist Security Info=True;database=mydatabase
Provider: .NET Framework Data Provider for MySQL
State: Open
Type: MySQL
Version: 5.5.24-8

In my project's settings file no connection string gets created.
[8 Oct 2012 18:05] Gabriela Martinez Sanchez
I was able to reproduce this bug:

The steps are:
1 - Create a web site using VS 2010
2 - Add a new dataset and put some data tables on it.
3 - Create a new project in VS 2012
4 - Add the web site previously created in step 2.
5 - Add some tables objects to the existing Dataset created in vs 2010 but make sure you use a server version 5.6.
6 - An error dialog is shown with the message the user reported.
[9 Oct 2012 18:59] Khalid Hazam
i was having a similar problem. The issue in my case was that the connection parameters for the dataset and for the server (in server explorer) were not the same (because i changed the database location).

Matching the connection parameters on both did the trick for me.

I'm using VS2012 and MySQL.NET 6.6.3 beta.
[9 Oct 2012 21:26] Gabriela Martinez Sanchez
Hi Wolfang, this bug is due to a bad configuration and is not a real bug. Please check your web config file and add a </clear> tag before each provider so any other  definition that doesn't belong to the web config of your application can be removed.

Something like:

<membership defaultProvider="MySQLMembershipProvider">
      <providers>
        <clear />
<add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.5.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" applicationName="test" description="MySQL default application" connectionStringName="LocalMySqlServer" writeExceptionsToEventLog="True" autogenerateschema="False" enablePasswordRetrieval="False" enablePasswordReset="True" requiresQuestionAndAnswer="True" requiresUniqueEmail="False" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
    </providers>
</membership>

After doing this you should not have any problems when adding any table to your dataset.

Please let us know if this work for you.
[9 Oct 2012 21:44] Wolfgang Kleinschmit
Hi Gabriela,
I have no idea why everyone talks about *Web* projects here.
My problem occurred with a normal .NET Windows Forms project.
Just follow my steps in the "How to repeat" section of my original post.
[9 Oct 2012 22:34] Gabriela Martinez Sanchez
I followed the steps you mentioned in your original post and the bug didn't show. It only happened when having a website as I described and it was a bad configuration issue. If you could send us your solution where the error occurs it might help.

Thanks.
[10 Oct 2012 6:57] Alessandro Pisani
Hi all,
as i said before i have the problem described before on both web and console projects when opening datasets originally created with VS2010 reopening them in VS2012. I usually talks about web projects as we're using a lot of them and so we more frequently encounter the bug working on them.
Gabriela: as the bug is now officially recognized by Oracle could we expect a fix soon ? It is quite annoying having to switch VS in order to be able to modify a dataset.
thank you for your help
[10 Oct 2012 13:16] Gabriela Martinez Sanchez
Alessandro: I have tried to reproduce the bug with console, windows forms and web sites and the only scenario that showed it was with websites and it was as I said an issue in the configuration there wasn't bug at the code. I'll do more tests and of course if there is a bug in the code we'll fix it ASAP.
[17 Oct 2012 7:22] Alessandro Pisani
Hi Gabriela, any news on this?
Is there any chance to have this bug fixed for the 6.6.4 release ? (web projects using datasets on mysql are unusable on vs2012 with this bug...)
Thank you for your help
[17 Oct 2012 16:13] Gabriela Martinez Sanchez
Hi Alessandro,
6.6.4 is in code freeze since more than a week ago so it won't be possible to include it in this release. We need to have a clearer scenario where the bug can be reproducible. I only have seen it in one scenario and it was a configuration error. 

Could give us more details on the configuration you're using for your project. Do you have any web providers or is it a local or remote connection when the error occur?. This could be very helpful.

Thanks in advance.
[17 Oct 2012 16:22] Alessandro Pisani
Hi Gabriela,
as per you comment dated [8 Oct 18:05] saying "I was able to reproduce this bug:" I thought the bug was already aknowledged.
Btw, once again: it happens to me on both web and console projects, both of them containing strongly typed datasets. All the projects were originally created with vs2010 (where they still works FINE) but they shows the bug in vs2012 with no changes. All the projects don't use ANY provider in web.config/app.config and all of them are connecting to mysql servers located outside the development pc (usually inside the LAN). All the servers are using mysql 5.5.10.

Please let me know if you need further details.
Thank you in advance for your help
[20 Oct 2012 10:40] Alessandro Pisani
Hi,
i've just tested version 6.6.4-rc and the bug is still there.
Is there any chance to have an usable Mysql connector for VS2012 for the GA version ?
[20 Oct 2012 16:43] Gabriela Martinez Sanchez
Hi Alessandro, we really appreciate your feedback and interest in this bug. We're working in providing you a fix and we look forward to release it ASAP.

Thanks,
[23 Oct 2012 21:32] Gabriela Martinez Sanchez
Alessandro, finally was able to reproduce consistently the bug scenario and I found a workaround which prevents the annoying dialog of the Keyword not supported. Just follow these steps (all steps using VS2012)

1-Open your web.config/app.config file 
2-Locate the connection string in the connectionstrings section that links your dataset designer with your database.
3-If you have more than one connection string just put the dataset connection string in the first place of the list and save the changes. Another option is to have only the connection that links your dataset, but that is only when you just use one connection in your application. 
4- Work with your dataset.

These steps avoid the calling to a method (in the VS assemblies) which tries to match the connection strings on your config file vs. the ones that are in the Designer which causes the exception to be thrown. 

Please let me know if this works for you.
[24 Oct 2012 6:46] Alessandro Pisani
Hi Gabriela,
i'm sorry but the workaround doesn't work for me.
My web.config (without the workaround) already has only one connection string:

  <connectionStrings>
    <!-- production (new db cluster) -->
    <add name="test2ConnectionString" connectionString="server=172.16.0.19;User Id=testdb;database=testdb;password=password;persist security info=True" providerName="MySql.Data.MySqlClient"/>
    <!-- staging (test server) -->
    <!-- <add name="test2ConnectionString" connectionString="server=172.16.0.18;User Id=testdb_staging;database=testdb_staging;password=password;persist security info=True" providerName="MySql.Data.MySqlClient" /> -->
  </connectionStrings>

I tried with a dataset which has the following line in its defs (opening it with XML editor) : 

        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="test2ConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="test2ConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.netmovietest2ConnectionString.ConnectionString" Provider="MySql.Data.MySqlClient" />
        </Connections>

As you can see from the web.config extract above, only one connection is active.
I've already tried removing the commented connection and comments leaving only the first connection as you suggested in the workaround but also this doesn't work.

As of today, the only "workaround" I found is to use vs2012 for everything except datasets and using vs2010 for the latter :(

Thanks for your help,
Alessandro
[24 Oct 2012 15:01] Gabriela Martinez Sanchez
hi Alessandro,

Sorry to hear the workaround didn't work. We're working in the fix already and the problem is due to some changes in the logic for discovering the connections in Dataset designer. We'll let you know as soon as the fix is ready. 

Thanks.
[24 Oct 2012 22:43] Gabriela Martinez Sanchez
A fix for this bug has been committed and pushed for the branches: 6.4, 6.5
,6.6. That will be released in the upcoming versions: 6.4.6, 6.5.5, 6.6.5.
[2 Nov 2012 0:07] Joel Neves
Hi Gabriela, 
I have a Windows Form project from VS2010 and have that error in the following situations on my dataset:
-Drag&Drop to create a new TableAdapter
-Edit original Query from DataTable

I tryed all those steps you sugested above but with no success
[8 Nov 2012 8:00] Alessandro Pisani
Hi,
is there any time frame for the 6.6.5 release ?
Thank you,
Alessandro
[26 Nov 2012 14:34] Celio Cantalice
Hi!

Are there any progress about this error?

Att,
[26 Nov 2012 14:44] Alessandro Pisani
Gabriela, you announced the fix was scheduled for the 6.6.5 release on 24th october. As of today, 26th Nov, there is still NO NEWS about nor a temporary fix neither the release of the new version.
This is TOTALLY UNACCEPTABLE since mysql connector is COMPLETELY UNUSABLE in VS2012 with this bug.
Could you please provide all of us, users, a timeframe for the release or a temporary fix?
[26 Nov 2012 15:00] Celio Cantalice
I managed to solve my problem with this error by adding the single quotes connectionString in the project properties.

ex:
server = 'myserver'; User Id = 'User', password = 'password', database = 'database'

No longer had the error. Then I erased the old connections and created a new one with the same parameters.
[26 Nov 2012 16:06] Gabriela Martinez Sanchez
Alessandro, Celio, thanks for your feedback.

We have 6.4.6 ready to be published, and 6.5.5 in QA phase.

Since 6.4.6 has been already QAed it will be most likely published this week.

We announce all publications in MySQL .Net forums.
http://forums.mysql.com/list.php?38

I'll update this bug when we'll have the 6.4.6 published.

Thanks for your patience.
[27 Nov 2012 18:20] Gabriela Martinez Sanchez
To all the interested users we have release the Connector/Net 6.4.6 version which contains the fix for this bug. You can download it at:

http://www.mysql.com/downloads/connector/net/6.4.html

Thanks!
[27 Dec 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[1 Jan 2013 4:16] John Vanderburg
There was mention of a 6.4.6 release; however, I'm not sure how that helps as it is only for VS2010.

Did I miss something or do VS2012 users have to wait for 6.6.5?
[2 Jan 2013 23:56] John Russell
Added to changelog for 6.4.6: 

Visual Studio 2012 projects could sometimes give the following error
dialog:

Failed to merge object(s).
Keyword not supported.
Parameter name: AttachDbFilename.

This issue affected mostly VisualStudio 2012
projects, either migrated from VisualStudio 2010 or including web
sites created with VS2010, connecting to a MySQL 5.5 server.
[11 Jan 2013 5:04] Neil Grooby
I have this status too.

My scenario is 6.6.4 connecting to 5.5 using Visual Studio 2012.

The only difference was that I wasn't directly storing the ConnectionString.

As there does not appear to be a workaround under Vs2012, please can someone reactivate this error - as it appears to still be a major issue.

Thanks
[11 Jan 2013 7:57] Alessandro Pisani
Months passed and still the promised 6.6.5 version has to be released.
Could you please give all of us developers an usable connector for vs2012 ?
[11 Jan 2013 15:31] Gabriela Martinez Sanchez
Hi Neil Grooby, Alessandro Pisani,

This bug was fixed on 6.6.4 version. Do you say that you're using this 6.6.4 version and the bug is still showing?

Thanks in advance for your attention.
[11 Jan 2013 15:38] Alessandro Pisani
Gabriela, are you kidding aren't you ?

[24 Oct 2012 22:43] Gabriela Martinez Sanchez

A fix for this bug has been committed and pushed for the branches: 6.4, 6.5
,6.6. That will be released in the upcoming versions: 6.4.6, 6.5.5, 6.6.5.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Despite what you publicly wrote to us in this bugtracker, 6.6.5 got never released so far and the 6.6.4 version still gives the error at least on my side (and also on my collegues pcs).
Could you please give us a definitive answer on this ?
[11 Jan 2013 16:03] Gabriela Martinez Sanchez
Hi Alessandro,
Thanks for your quick response. 

I apologize for the confusion in the versions including this fix. I double checked and it is as follows: 
6.4.6, 6.5.5, 6.6.5. 

6.4.6 has been already released and has the fix, 

6.5.5 has also been released and has the fix too (downloads at http://dev.mysql.com/downloads/connector/net/6.5.html#downloads)

6.6.5 Hasn't been released yet and I don't have a date for a release yet.

Do you have any inconvenience about using 6.4.6 or 6.5.5?
[13 Jan 2013 23:02] Neil Grooby
Given that 6.6.x is the recommendation for using Visual Studio 2012, I think we need an interim release.

At present I am having do design my DB Access Layer DLL in VS 2010 and then copy the whole project into 2012 as it is part of my larger project - Given I have 27 DLL's, having to switch back to VS2010 to do the design is a pain.

I am not aware of the exact code changes that need to be addressed, but if it is part of a broader code change base, surely we can just have something which addresses this issue as 6.6.5 and the other code changes rolled into 6.6.6 ?

VS2012 has been out for 4 months now, so don't think my expectation is too great
[14 Jan 2013 15:53] Gabriela Martinez Sanchez
Hi Neil,

We have plans to have a maintenance release for 6.6.5 in the first week of February. I don't think it could be possible before. Is this time frame a problem for you?

Thanks in advance for your response.
[14 Jan 2013 21:18] Neil Grooby
Im only one of a number of people affected. Given you are talking 3 weeks away and I can't make a determination on what has changed on your side, it seems a long time for something that is fundamentally broken.

I have my work around, but this impacts others, so ultimately its your judgement call. Having been a developer for 25 years however and this fix has a Critical S1 rating, I think this is an extremely long time, given when it was first reported - which would make it 5.5 months, it detracts from an otherwise great product.

Just my thoughts
[14 Jan 2013 22:00] Gabriela Martinez Sanchez
Code changes including this fix.

Attachment: MySql.Data.Changes.zip (application/x-zip-compressed, text), 7.64 KiB.

[14 Jan 2013 22:02] Gabriela Martinez Sanchez
Hi again Neil,

I understand your point and I really would like that this fix would've had completed its release cycle by now, I apologize for this long delay. We're working on newer features and doing maintenance releases for the previous versions so that's why we haven't got to 6.6 repo yet. I'm hoping a file with the changes could be useful for you so you can build a Connector/Net with this fix.I don't have any other way to give you the complete new version before it's released. 

Here's a list of steps to build the Connector with this new change:

http://forums.mysql.com/read.php?38,519005,535207#msg-535207

Please let me know if you have any problem following these steps.
[14 Jan 2013 22:26] Neil Grooby
Hi Gabriela,

Firstly, thanks for making it available. I will endeavour to build it at work today (Australian time, so early).

Once built, I will report back the status.

Thanks

Neil
[15 Jan 2013 23:59] Neil Grooby
Hi Gabriela,

I tried building the project for VS2012 last night. The first thing I got was an error in converting the MySQL.VisualStudio project. I think from the code changes it is not really an issue - the file you sent seems to only relate to MySql.Data as the changes ?

As I don't want to break my installation, do I just need to create my own Public Key, build the MySql.Data and MySql.Data.Entity and then install them in the GAC ?

Thanks

Neil
[16 Jan 2013 3:42] Gabriela Martinez Sanchez
Hi Neil,
yes, you're correct on the steps, please let me know if you have any problem.
[31 Jan 2013 12:17] Paul Bartlett
For what it's worth, I have 3exactly the same problem with Winforms.  It is working fine of visual studio 2010, but not on visual studio 2012.

The only solution I have is to do the data layer in visual studio 2010 and the app in 2012, being VERY CAREFUL not to have the two step on each others toes!

This is very inconvienient and I won't use MySQL for the next VS project until this is resolved.
[31 Jan 2013 17:11] Gabriela Martinez Sanchez
hi P. Bartlett:

Thanks for your feedback. We have an upcoming release between today and next Wednesday for a 6.6.5 version including the fix for this bug. We really appreciate  your patience and we would like to ask you if you can keep checking at the forums (http://forums.mysql.com/list.php?38) or the blogs (http://blogs.oracle.com/MySqlOnWindows/) where we publish every release for Connector/Net so you can be aware as soon as it has been released.

Please let us know if you have any question or comment.
[4 Feb 2013 23:56] Neil Grooby
I know this isn't a solution, but just some feedback which may assist tracking this issue down.

I "fixed" this by installing Windows 8 Pro and doing a fresh install of everything in Vs2012. I was then able to open the Solution of 30 projects, with the DB access layer and modify it perfectly. This was exactly the same MySQL, Connector and third party components.

Could it be that the issue is some "legacy" from an old Connector version ? ie, having VS2010, installing 2012, installing the new 6.6.4 Connector causes this issue ? As identified, my installation being fresh does not have any old connector.

Hope that provides some insight (?)

Neil
[5 Feb 2013 6:06] Gabriela Martinez Sanchez
Thanks for the information and feedback N. Grooby. There is a fix for this bug on the version 6.6.5. Although this issue didn't seem to have any relation with the OS or Connector/Net version, at least when we did the testing and fixing I'll check with the setup you provided us (Windows 8 and a clean installation of Connector/net) to see if there is anything else related to this bug.
[8 Mar 2013 19:31] John Russell
Added to changelog for 6.4.6, 6.5.5, 6.6.5: 

Visual Studio 2012 projects could sometimes give the following error
dialog:

Failed to merge object(s). Keyword not supported. Parameter
name: AttachDbFilename.

This issue affected mostly VisualStudio 2012
projects, either migrated from VisualStudio 2010 or including web
sites created with VS2010, connecting to a MySQL 5.5 server.