connector-net

MySql.ConnectorNET.Data vs MySql.Data

核能气质少年 提交于 2020-01-14 08:05:08
问题 What is the difference between the MySql.ConnectorNET.Data and the MySql.Data packages on NuGet? They both appear to be published by the same user (MySQL), and the Project Site links point to the same location (http://dev.mysql.com/downloads/). After installing both, the ConnectorNET version appears to lag behind the other version by a release. 回答1: Since the time you asked this question, Oracle (the package owner) has made the situation clear: MySql.Data is the official package that

MySql.ConnectorNET.Data vs MySql.Data

被刻印的时光 ゝ 提交于 2020-01-14 08:05:06
问题 What is the difference between the MySql.ConnectorNET.Data and the MySql.Data packages on NuGet? They both appear to be published by the same user (MySQL), and the Project Site links point to the same location (http://dev.mysql.com/downloads/). After installing both, the ConnectorNET version appears to lag behind the other version by a release. 回答1: Since the time you asked this question, Oracle (the package owner) has made the situation clear: MySql.Data is the official package that

Exception when trying to use Mysql.Data.Entity

旧城冷巷雨未停 提交于 2020-01-06 05:23:49
问题 I'm trying to get a test project running using MySQL and EF6 using Visual Studio 2019 Community Preview for Mac. I am using the Web Application (Model-View-Controller) / .NET Core -> App template as a starting point as well as the MyWind database. I'm getting the following exception and am not sure how to proceed. TypeLoadException: Could not load type 'System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptionProvider' from assembly 'System.ComponentModel.DataAnnotations,

The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file

社会主义新天地 提交于 2019-12-30 08:02:05
问题 I have an asp.net solution using entity framework 6 to mysql server. now I have to work on that solution on a new machine, but I have some problems: 1) when building the solution I get error: "The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file". App.config: <entityFramework> <providers> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6,

How to insert 20 million record into MySql database as fast as possible

自作多情 提交于 2019-12-17 07:52:18
问题 I have a database table like below: create table temperature (id int unsigned not null auto_increment primary key, temperature double ); And in my program I got about 20 million temperature to insert into the table. I worke in .Net environment, use Connector/Net connecting to MySql. The code was like below: List<double> temps = new List<double>(); ... string connStr = "server=localhost;user=name;database=test;port=3306;password=*****;"; MySqlConnection conn = new MySqlConnection(connStr); try

how to add mysql data source in visual studio 2012 express for web

前提是你 提交于 2019-12-12 03:27:38
问题 i'm trying to add mysql connection to my asp.net mvc 4 projects but i dont see it on the data source window. after installing visual studio 2012 express for web i added mysql Connector/Net through nuget. i wanted to add new connection to mysql db but i did see mysql data source on the data source window list. after a search i realized that i have v6.6.4 and it supported from 6.6.5 so i uninstalled it from nuget and install 6.6.5 from mysql website(a complete install). it didnt helped.. i also

Executing MySqlCommand (StoredProcedure) with output parameter

心已入冬 提交于 2019-12-11 06:03:03
问题 I can't figure out how to use MySQLCommand provided by Connector/NET 3.6.5. Basically here is the code I'm using and exception I get when I run ExecuteNonQuery. What am I doing wrong here? I have no ideas left :( var connection = GetConnection(); connection.Open(); var command = new MySqlCommand("PredictPaperRankInInterval", connection); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new MySqlParameter("p_journalId", SqlDbType.VarChar) { Value = "test" }); command

MySQL Connector/NET Output Parameter Returning NULL

依然范特西╮ 提交于 2019-12-10 19:51:23
问题 Using the following code: MySqlParameter curParam = new MySqlParameter("var", MySqlDbType.Int32); curParam.Direction = System.Data.ParameterDirection.Output; oCmd.Parameters.Add(curParam); With the following Stored Procedure: CREATE PROCEDURE testProc(OUT var INT) BEGIN SELECT 1, 2, 3; SELECT 27 INTO var; END $$ Running this from the console returns "27": CALL testProc(@i); SELECT @i; However in .NET, when executing the query (when the connection is still open), curParam.value returns NULL.

Incorrect Guid order

与世无争的帅哥 提交于 2019-12-07 22:26:18
问题 Ok I have a GUID f5cc4100-f1b4-4af6-9e9e-224b0eb74166 and I am inserting it to MySQL database using the ADO .NET Connector. I can do it in two ways: 1) Feed byte array to .NET Connector string query = "insert into test (pk_id) values (@id)"; using (var c = new MySqlCommand(query, conn)) { c.Parameters.AddWithValue("@id", new Guid("f5cc4100-f1b4-4af6-9e9e-224b0eb74166").ToByteArray()); c.ExecuteNonQuery(); } 2) Rely on MySQL standard function to convert hexadecimal to binary string. string

The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file

我们两清 提交于 2019-12-01 02:44:54
I have an asp.net solution using entity framework 6 to mysql server. now I have to work on that solution on a new machine, but I have some problems: 1) when building the solution I get error: "The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file". App.config: <entityFramework> <providers> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider> </providers> <