Reputation: 46
I'm fairly experienced with Visual Studio 2013 and I'm now upgrading to VS 2015 and running into and issue adding a new datasource to a Windows Forms Application. It is very easy to recreate my issue.
Here's my setup:
Visual Studio 2015 Enterprise 2015 Update 3
MySQL for Visual Studio 1.2.6
Connector/Net 6.9.9
Note: The above configuration is supported according to the support information matrix located at http://dev.mysql.com/doc/visual-studio/en/visual-studio-install.html and I've also tried just about every other permutation of supported software listed there.
Here's how to recreate the issue:
New C# Windows Forms Application
Add New Data Source
Database
Dataset
New Connection (connects just fine)
Save the connection
Choose your database objects
Select any table
Finish
Error: Some updating commands could not be generated automatically. The database returned the following error: You have a usable connection already.
Grateful for anyone who can even give a clue as to what I might be doing wrong.
Upvotes: 0
Views: 14390
Reputation: 15
Follow these steps:
Upvotes: 0
Reputation: 2379
I tried out almost all the above mentioned solutions all of them failed at last what i did is
In backend you can write something like this
var ds = this.GetData();
var dt = ds.Tables[0];
ReportViewer1.Reset();
ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report1.rdlc");
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", dt)); // same name as dataset created under report data menu
ReportViewer1.DataBind();
ReportViewer1.LocalReport.Refresh();
Upvotes: 0
Reputation: 96
Upvotes: 6
Reputation: 46
Here's the solution I found. As I delved further I found that something (I know not what) was expecting Connector/net 6.9.9 and something else (again I don't know what) was expecting Connector/net 6.9.8. There is nothing in my projects or installation which should have referenced 6.9.8. In any event, I installed 6.9.8 and everything has worked perfectly since.
Upvotes: 1
Reputation: 1
I struggled with this for the last 24 hours.
First: have you deleted any project files from VS? I went to my recycle bin and restored everything from VS I had deleted.
This resolved the issue. Make sure any data connections from VS are restored.
If that doesn't work, let me know.
Upvotes: 0