Visual Studio - Failed to link MySql database table to DataSet - c#

When I try to drag a MySQL table to a DataSet after successfully adding a connection to a database in Server Explorer, I receive two error messages, one after the other:
"Some updating commands could not be generated automatically. The database returned the following error: Unexpected error."
"Mouse drag operation failed. Could not retrieve schema information for table or view."
Based on answers for similiar problems, I reinstalled 'MySqlConnector/Net' and 'MySql for Visual Studio', and the same problem persists. I would like to know what is going wrong.

I found the solution. After hours and hours of tinkering I found out that the current versions of MySql-for-visual-studio and MySqlConnector/Net have a bug, which can only be fixed by unninstalling those and installing MySQL-for-visual-studio-1.2.6.msi and MySqlConnector-6.9.8.msi, exactly in this order.

This worked, except I had to install 1.2.7 before I could get MYSQL to show up as an option as data provider.

in my case the error statement was "you have a usable connection already" rather than "Unexpected Error" when adding a table as a data source, the above solution with MySql for VS 1.2.7 and MySql .net connector 6.9.8 worked for me as well. these need to be installed in the exact order as mentioned above. I'm using VS2017 15.9.11.

Related

C# - How to fix error "missing server and user in credentials" when create new connection in VS2017

I have a problem that I cannot load my database into visual studio 2017.
I used entity framework 6.2 and I would like to load my database like this picture.
error said
missing server and user in credentials
I have tried to add some reference but still the same problem.
Thanks Guys enter image description here
Please try delete your connection localhost(member) in Server Explorer > Data Connections first, the re-create a new one.

Some updating commands could not be generated automatically the database returned the following error unexpected error

I am trying to add a connection to MySql server however when trying I am getting an error "Some updating commands could not be generated automatically the database returned the following error unexpected error" I have checked all privileges for the user that I am using and have reinstalled all MySQL connectors etc and still nothing. What am I doing wrong.
[MySQL Data Source Wizard not working on Visual Studio 2017
You can try changing your Connector/NET to version 6.9.8, and changing the MySQL for Visual Studio as well to version 1.2.7
If it prompts"Failed to add relation(s) Specified cast is not valid".
Don't worry, you can normal builb project, dataGridView will load data normally.

Exception thrown when trying to access Entity DB, after updating visual studio 2015 update 1

Without changing any code I am getting wierd errors after updating visual studio 2015. Basically its saying:
An exception of type 'System.Data.Entity.Core.EntityException'
occurred in EntityFramework.SqlServer.dll but was not handled in user code
Additional information: The underlying provider failed on Open.
Unhandled Exception Error - Login Failed for User
When trying to access the DataBase. I am using SQL server 2014, and have changed no code in solution and changed nothing in SQL Server MS, it must be related to the latest update for visual studio released around 15/12/15. I can access the database from SQL Server ok, and can see all setting etc. But as i said I have changed nothing at all, just updated visual studio.
Has anyone else encountered this error in last few days? It is very strange, and seems unusual as im only trying to access local DB .\SQLEXPRESS
This is method where error occurs:
private static string GetSchemaVersion()
{
var dataRepository = new GenericRepository();
return dataRepository.GetAll<SchemaVersion>().Max(s => s.CurrentVersion).ToString();
}
Ok so I feel pretty stupid.. Error solved, The problem was the authentication mode changed to SQL only, it should be windows and sql authentication. It must have changed during an update. I changed that, restarted server restarted visual studio, rebuilt/cleaned project and everthing worked fine.

uCommerce Installation Error for Umbraco 7

Using Umbraco version 7.1.4 assembly: 1.0.5261.28127
Download install package from ucommerce.net - uCommerce-for-Umbraco7-6.6.2.15058.zip
Attempted to install multiple times. First (10+) times that database was on Azure. The install doesn't "error" out, but I would suspect that I would have more database tables created in the database that I have:
The installation created an icon in the backoffice, uCommerce. However, when I click on it, I receive this error:
Server error: Contact administrator, see log for full details.
Failed to retrieve data for application tree uCommerce
In my log file:
ERROR NHibernate.AdoNet.AbstractBatcher - Could not execute query: select user0_.UserId as UserId100_, user0_.ExternalId as ExternalId100_ from uCommerce_User user0_ where user0_.ExternalId=#p0
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'uCommerce_User'.
I found this link, Invalid object name 'uCommerce_User', which suggested to bring the database off of Azure.
I duplicated the database from Azure to my local, and changed the connection string. I browsed to the local instance to make sure that the connection string was working. Attempted to re-install another (10+) times, and still receive the same error when clicking on the uCommerce icon in the Umbraco backoffice.
It's obvious that I do not have uCommerce_User table created, as all the tables that were created from the installation are in the image above. I attempted to run all 128 sql files from the installation folder in the package, but after the 4th script I began to receive constrant errors.
I have full rights to create tables, and do not know why it is erroring out. Anyone else have/had this issue?
Apprec -
I removed all constraints from the Azure db regarding uCommerce tables, then deleted the uCommerce tables, and THEN re-ran all 130 sql scripts, and it installed OK. Now the uCommerce section in Umbraco is loading.

Failed to load native dll (C:\Users\[Username]\AppData\Local\Temp\...\dbdata.dll

I'm trying to create an SAConnection into a Sybase IQ database. I'm attempting to create the connection through a simple visual studio C# application.
My code fails at:
SAConnection connection = new SAConnection(connString);
And pops up with a message box:
SQL Anywhere ADO.NET DataProvider
Failed to load native dll (C:\Users\<Username>\AppData\Local\Temp\{16AA8FB8-4A98-4757-B7A5-0FF22C0A6E33}_0\dbdata.dll
Link to picture of messagebox
The code subsequently throws an exception:
"The type initializer for 'iAnywhere.Data.SQLAnywhere.SAConnection' threw an exception" with InnerException as described in the message box.
I've checked and double checked the connection string and am confident it is correct. I am using iAnywhere.Data.SQLAnywhere version 11.0.0.11292 and am connecting to a Sybase IQ
database. I am running Win7 64 bit and can connect to the database without a problem in Aqua Data Studio. Any ideas on this would be great.
Problem solved by reinstalling Sybase IQ drivers and updating to latest version of iAnywhere.Data.SQLAnywhere.

Categories