Asp.net has a way of protecting parts of websites with authorized users and authorized roles. Its called "membership". It uses a database that you provide. For MySql, you modify a certain file called "machine.config" and tell it to use a mysql database. That is not an option for me, because I'm on a shared server. "machine.config" is a file that I can't get at. Is there another alternative that will let me use mySQL?
↧
MySql and asp.net roles (1 reply)
↧
Receive DataTable as Input Argument in Stored Procedure (2 replies)
Dear Experts,
I would like to Pass a DataTable from My Application to Mysql Storedprocedure as Input Arugument.. As we did the same using MSSQL Table Type.
But in Mysql I couldn't find any resource available regarding how to achieve it.
Kindly suggest me your views.
Thanks..
I would like to Pass a DataTable from My Application to Mysql Storedprocedure as Input Arugument.. As we did the same using MSSQL Table Type.
But in Mysql I couldn't find any resource available regarding how to achieve it.
Kindly suggest me your views.
Thanks..
↧
↧
C# DateTime to MySqlDateTime convert (1 reply)
Im using MySQL connector to receive data form database and put values to dataset->dataGridView. Then i need to change value in date column when i click on column with checkbox:
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].Name == "Продано")
{
DataGridViewCheckBoxCell checkbox = (DataGridViewCheckBoxCell)dataGridView1.CurrentCell;
bool isChecked = (bool)checkbox.EditedFormattedValue;
DateTime dt = DateTime.Today;
dataGridView1.Rows[e.RowIndex].Cells[4].Value = dt.ToString("yyyy-MM-dd");
}
}
I need to convert DateTime to MySqlDateTime, to insert value in some column. Now i have error, that expects MySqlData type. Unable to convert System.DateTime value to MySQL date/time
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].Name == "Продано")
{
DataGridViewCheckBoxCell checkbox = (DataGridViewCheckBoxCell)dataGridView1.CurrentCell;
bool isChecked = (bool)checkbox.EditedFormattedValue;
DateTime dt = DateTime.Today;
dataGridView1.Rows[e.RowIndex].Cells[4].Value = dt.ToString("yyyy-MM-dd");
}
}
I need to convert DateTime to MySqlDateTime, to insert value in some column. Now i have error, that expects MySqlData type. Unable to convert System.DateTime value to MySQL date/time
↧
how to specify the client port? (1 reply)
hi everyone:
my client machine has only 8888 port can connect to mysql server,so how can I open the MySqlConnection in the client program? the MySqlConnection will assign a random tcp port everytime when the program invoking Open() method, it failed in TCP 3-Way Handshake.
sorry for my English :(
my client machine has only 8888 port can connect to mysql server,so how can I open the MySqlConnection in the client program? the MySqlConnection will assign a random tcp port everytime when the program invoking Open() method, it failed in TCP 3-Way Handshake.
sorry for my English :(
↧
Can't connect to MySQL server from VS2012 Win 8.1 host (1 reply)
Hi,
I am running MySQL on a Win Vista machine and it seems to be running just fine. When I try to connect using a connect string in my C# code in VS2012 from a Win 8.1 host, it tells me that my host is unable to connect. I did the GRANT ALL on the server, verified the firewall and root password, but, nothing seems to work. Am I doing something wrong? Thanks.
I am running MySQL on a Win Vista machine and it seems to be running just fine. When I try to connect using a connect string in my C# code in VS2012 from a Win 8.1 host, it tells me that my host is unable to connect. I did the GRANT ALL on the server, verified the firewall and root password, but, nothing seems to work. Am I doing something wrong? Thanks.
↧
↧
How To: Using spatial data with Entity Framework and Connector/Net (no replies)
One of the new features introduced in Entity Framework 5.0 is the incorporation of some new types of data within an Entity Data Model: the spatial data types. These types allow us to perform operations on coordinates values in an easier way.
Post link https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_spatial_data
Looking forward to your feedback.
Post link https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_spatial_data
Looking forward to your feedback.
↧
MySql Connector/NET 6.7.4 GA has been released (no replies)
MySQL Connector/Net 6.7.4, a new version of the all-managed .NET driver for MySQL has been released. This is the GA, is feature complete. It is recommended for production environments. It is appropriate for use with MySQL server versions 5.0-5.7.
It is now available in source and binary form from http://dev.mysql.com/downloads/connector/net/#downloads and mirror sites (note that not all mirror sites may be up to date at this point-if you can't find this version on some mirror, please try again later or choose another download site.)
The 6.7 version of MySQL Connector/Net brings the following new features:
- WinRT Connector.
- Load Balancing support.
- Entity Framework 5.0 support.
- Memcached support for Innodb Memcached plugin.
- This version also splits the product in two: from now on, starting version 6.7, Connector/NET will include only the former Connector/NET ADO.NET driver, Entity Framework and ASP.NET providers (Core libraries of MySql.Data, MySql.Data.Entity & MySql.Web). While all the former product Visual Studio integration (Design support, Intellisense, Debugger) are available as part of MySql Windows Installer under the name "MySql for Visual Studio".
WinRT Connector
-------------------------------------------
Now you can write MySql data access apps in Windows Runtime (aka Store Apps) using the familiar API of Connector/NET for .NET.
Load Balancing Support
-------------------------------------------
Now you can setup a Replication or Cluster configuration in the backend, and Connector/NET will balance the load of queries among all servers making up the backend topology.
Entity Framework 5.0
-------------------------------------------
Connector/NET is now compatible with EF 5, including special features of EF 5 like spatial types.
Memcached
-------------------------------------------
Just setup Innodb memcached plugin and use Connector/NET new APIs to establish a client to MySql 5.6 server's memcached daemon.
Bug fixes included in this release:
- Fix for Entity Framework when inserts data having Identity columns (Oracle bug #16494585).
- Fix for Connector/NET cannot read data from a MySql table using UTF-16/UTF-32 (MySql bug #69169, Oracle bug #16776818).
- Fix for Malformed query in Entity Framework when eager loading due to multiple projections (MySql bug #67183, Oracle bug #16872852).
- Fix for database objects with 'dbo' prefix when using automatic migrations in Entity Framework 5.0 (Oracle bug #16909439).
- Fix for bug IIS application pool reset worker process causes website to crash (Oracle bug #16909237, Mysql Bug #67665).
- Fix for bug Error in LINQ to Entities query when using Distinct().Count() (MySql Bug #68513, Oracle bug #16950146).
- Fix for occasionally return no data when socket connection is slow, interrupted or delayed (MySql bug #69039, Oracle bug #16950212).
- Fix for ConstraintException when filling a datatable (MySql bug #65065, Oracle bug #16952323).
- Fix for Data Provider is not found after uninstalling Mysql for visual studio (Oracle bug #16973456).
- Fix for nested sql generated for LINQ to Entities query with Take and Order by (MySql bug #65723, Oracle bug #16973939).
The documentation is available at http://dev.mysql.com/doc/refman/5.7/en/connector-net.html
Enjoy and thanks for the support!
--
Fernando Gonzalez Sanchez | Software Engineer |
Oracle MySQL Windows Experience Team, Connector/NET
Guadalajara | Jalisco | Mexico
It is now available in source and binary form from http://dev.mysql.com/downloads/connector/net/#downloads and mirror sites (note that not all mirror sites may be up to date at this point-if you can't find this version on some mirror, please try again later or choose another download site.)
The 6.7 version of MySQL Connector/Net brings the following new features:
- WinRT Connector.
- Load Balancing support.
- Entity Framework 5.0 support.
- Memcached support for Innodb Memcached plugin.
- This version also splits the product in two: from now on, starting version 6.7, Connector/NET will include only the former Connector/NET ADO.NET driver, Entity Framework and ASP.NET providers (Core libraries of MySql.Data, MySql.Data.Entity & MySql.Web). While all the former product Visual Studio integration (Design support, Intellisense, Debugger) are available as part of MySql Windows Installer under the name "MySql for Visual Studio".
WinRT Connector
-------------------------------------------
Now you can write MySql data access apps in Windows Runtime (aka Store Apps) using the familiar API of Connector/NET for .NET.
Load Balancing Support
-------------------------------------------
Now you can setup a Replication or Cluster configuration in the backend, and Connector/NET will balance the load of queries among all servers making up the backend topology.
Entity Framework 5.0
-------------------------------------------
Connector/NET is now compatible with EF 5, including special features of EF 5 like spatial types.
Memcached
-------------------------------------------
Just setup Innodb memcached plugin and use Connector/NET new APIs to establish a client to MySql 5.6 server's memcached daemon.
Bug fixes included in this release:
- Fix for Entity Framework when inserts data having Identity columns (Oracle bug #16494585).
- Fix for Connector/NET cannot read data from a MySql table using UTF-16/UTF-32 (MySql bug #69169, Oracle bug #16776818).
- Fix for Malformed query in Entity Framework when eager loading due to multiple projections (MySql bug #67183, Oracle bug #16872852).
- Fix for database objects with 'dbo' prefix when using automatic migrations in Entity Framework 5.0 (Oracle bug #16909439).
- Fix for bug IIS application pool reset worker process causes website to crash (Oracle bug #16909237, Mysql Bug #67665).
- Fix for bug Error in LINQ to Entities query when using Distinct().Count() (MySql Bug #68513, Oracle bug #16950146).
- Fix for occasionally return no data when socket connection is slow, interrupted or delayed (MySql bug #69039, Oracle bug #16950212).
- Fix for ConstraintException when filling a datatable (MySql bug #65065, Oracle bug #16952323).
- Fix for Data Provider is not found after uninstalling Mysql for visual studio (Oracle bug #16973456).
- Fix for nested sql generated for LINQ to Entities query with Take and Order by (MySql bug #65723, Oracle bug #16973939).
The documentation is available at http://dev.mysql.com/doc/refman/5.7/en/connector-net.html
Enjoy and thanks for the support!
--
Fernando Gonzalez Sanchez | Software Engineer |
Oracle MySQL Windows Experience Team, Connector/NET
Guadalajara | Jalisco | Mexico
↧
MySql for Visual Studio 1.0.2 GA has been released (no replies)
MySQL for Visual Studio is a new product including all of the Visual Studio integration previously available as part of Connector/Net. The product is now released as GA and is appropriate for use in production environments. It is compatible with MySQL Server versions 5.0-5.7 and Visual Studio versions 2008-2012.
It is now available as part of MySql Installer for Windows (http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html).
The 1.0 version of MySQL for Visual Studio brings the following new features:
- Workbench Launching
- MySql Utilities Launching.
- Table Script Generation.
- The functionality of the core libraries (ADO.NET, EF, ASP.NET providers is available as the separate download of Connector/NET 6.7).
Features available from previous versions:
- Server explorer connections
- Design time support
- Entity Framework designer (Database First & Model First)
- Stored Routines Debugger
- Intellisense
- ASP.NET Website Configuration Tool
Workbench Launching
-------------------------------------------
A context menu for connections in Server Explorer allows to launch Workbench (if Workbench is installed).
MySql Utilities Launching
-------------------------------------------
A context menu for connections in Server Explorer allows to launch a prompt for MySql Utilities (if MySql Utilities is installed).
Table Script Generation
-------------------------------------------
A context menu for tables is available in Server Explorer to generate the script for a table.
The full list of bug fixes for "MySql for Visual Studio" 1.0 follows:
1.0.2
- Fix for Documentation not found (Oracle bug #6915712).
- Fix for intellisense completion, now Views are displayed together with Tables calling intellisense (Oracle Bug #16881451).
- Fix for parser syntax, now the parser supports the clause ALTER TABLE table_name RENAME {INDEX|KEY} old_index_name TO new_index_name introduced in MySql 5.7. (Oracle Bug #16881481)
- Fix for Debugging a routine produces an error when binary log is enabled (Oracle bug #16941181).
- Fix for WorkItem 552: MySql for Visual Studio Installer fails when installing against VS2008.
- Fix for bug Vs plugin installer is not working (Oracle bug #16973339).
- Fix for bug Release notes file has no notes about (Oracle bug #16973326).
1.0.1
- Fix for "README" file and "Release Notes" file referes to connector 6.6.
- Fix for Parser fails to recognizes a complex view (Oracle bug #16815427).
- Fix for Altering table's primary key in designer not working (Oracle bug #16866053).
- Fix for Web configuration tool is not shown on mysql for visual studio (Oracle bug # 16902696).
- Fix for Model first is not supported using mysql for visual studio (Oracle bug # 16902743).
- Fix for Mysql for vs should not be installed with connector/net version < 6.7 (Oracle bug # 16902774).
- Fix for Resolve assemblies dependencies between MySql.Data (Connector/Net version) and MySql.Data (WI # 460).
- Fix for Showing an exception related to resources (Oracle bug #16903039).
1.0.0
- Added new option on Connection Node for Server Explorer Window in Visual Studio to give the user the option when WB is Installed to open the MySQL Utilities console window.
- Added new option on Connection Node for Server Explorer Window in Visual Studio to give the user the option when WB is Installed to open the SQL Editor Window using the same connection.
- Implemented a menu option to generate table script from server explorer context menu (Tracker task 433).
- Fix for bug If using repair option, then vs2010 doesnt allow to connect to db (Oracle bug #16238242).
- Fix for bug "Can't change the name for a view in view editor" (Oracle bug #13805346).
- Fix for Debugger cannot debug stored procedures with a main begin labeled and declare statements included (Oracle bug #16002371).
- Fix for bug If using repair option at Installer, then vs2010 doesnt allow to connect to db (Oracle bug #16238242).
- Fix for "Cannot change the name for a Foreign Key in table designer" (Oracle bug #16238068).
- Fix for error when trying to set primary key for a column with same name as mysql keyword (like INT) in table designer
(Oracle bug #16238102).
- Fix for databases not displayed in connect dialog for mysql script when correcting credentials, after entering a bad password
(Oracle bug #13805337).
- Fix for Debugger fails trying to debug a stored routine in a MySql server hosted in linux without lower_case_table_names option enabled
(MySql bug #69065, Oracle bug #16770384).
- Fix for Debugger issue, Values through watch tab shouldn't allow to be modified (Oracle bug #14545448).
- Fix for Visual Studio Mysql editor colors cannot be customized (Oracle bug #16453324, MySql bug #67994).
The documentation is available as part of Connector/NET at http://dev.mysql.com/doc/refman/5.7/en/connector-net.html
Enjoy and thanks for the support!
--
Fernando Gonzalez Sanchez | Software Engineer |
Oracle MySQL Windows Experience Team, Connector/NET
Guadalajara | Jalisco | Mexico
It is now available as part of MySql Installer for Windows (http://dev.mysql.com/tech-resources/articles/mysql-installer-for-windows.html).
The 1.0 version of MySQL for Visual Studio brings the following new features:
- Workbench Launching
- MySql Utilities Launching.
- Table Script Generation.
- The functionality of the core libraries (ADO.NET, EF, ASP.NET providers is available as the separate download of Connector/NET 6.7).
Features available from previous versions:
- Server explorer connections
- Design time support
- Entity Framework designer (Database First & Model First)
- Stored Routines Debugger
- Intellisense
- ASP.NET Website Configuration Tool
Workbench Launching
-------------------------------------------
A context menu for connections in Server Explorer allows to launch Workbench (if Workbench is installed).
MySql Utilities Launching
-------------------------------------------
A context menu for connections in Server Explorer allows to launch a prompt for MySql Utilities (if MySql Utilities is installed).
Table Script Generation
-------------------------------------------
A context menu for tables is available in Server Explorer to generate the script for a table.
The full list of bug fixes for "MySql for Visual Studio" 1.0 follows:
1.0.2
- Fix for Documentation not found (Oracle bug #6915712).
- Fix for intellisense completion, now Views are displayed together with Tables calling intellisense (Oracle Bug #16881451).
- Fix for parser syntax, now the parser supports the clause ALTER TABLE table_name RENAME {INDEX|KEY} old_index_name TO new_index_name introduced in MySql 5.7. (Oracle Bug #16881481)
- Fix for Debugging a routine produces an error when binary log is enabled (Oracle bug #16941181).
- Fix for WorkItem 552: MySql for Visual Studio Installer fails when installing against VS2008.
- Fix for bug Vs plugin installer is not working (Oracle bug #16973339).
- Fix for bug Release notes file has no notes about (Oracle bug #16973326).
1.0.1
- Fix for "README" file and "Release Notes" file referes to connector 6.6.
- Fix for Parser fails to recognizes a complex view (Oracle bug #16815427).
- Fix for Altering table's primary key in designer not working (Oracle bug #16866053).
- Fix for Web configuration tool is not shown on mysql for visual studio (Oracle bug # 16902696).
- Fix for Model first is not supported using mysql for visual studio (Oracle bug # 16902743).
- Fix for Mysql for vs should not be installed with connector/net version < 6.7 (Oracle bug # 16902774).
- Fix for Resolve assemblies dependencies between MySql.Data (Connector/Net version) and MySql.Data (WI # 460).
- Fix for Showing an exception related to resources (Oracle bug #16903039).
1.0.0
- Added new option on Connection Node for Server Explorer Window in Visual Studio to give the user the option when WB is Installed to open the MySQL Utilities console window.
- Added new option on Connection Node for Server Explorer Window in Visual Studio to give the user the option when WB is Installed to open the SQL Editor Window using the same connection.
- Implemented a menu option to generate table script from server explorer context menu (Tracker task 433).
- Fix for bug If using repair option, then vs2010 doesnt allow to connect to db (Oracle bug #16238242).
- Fix for bug "Can't change the name for a view in view editor" (Oracle bug #13805346).
- Fix for Debugger cannot debug stored procedures with a main begin labeled and declare statements included (Oracle bug #16002371).
- Fix for bug If using repair option at Installer, then vs2010 doesnt allow to connect to db (Oracle bug #16238242).
- Fix for "Cannot change the name for a Foreign Key in table designer" (Oracle bug #16238068).
- Fix for error when trying to set primary key for a column with same name as mysql keyword (like INT) in table designer
(Oracle bug #16238102).
- Fix for databases not displayed in connect dialog for mysql script when correcting credentials, after entering a bad password
(Oracle bug #13805337).
- Fix for Debugger fails trying to debug a stored routine in a MySql server hosted in linux without lower_case_table_names option enabled
(MySql bug #69065, Oracle bug #16770384).
- Fix for Debugger issue, Values through watch tab shouldn't allow to be modified (Oracle bug #14545448).
- Fix for Visual Studio Mysql editor colors cannot be customized (Oracle bug #16453324, MySql bug #67994).
The documentation is available as part of Connector/NET at http://dev.mysql.com/doc/refman/5.7/en/connector-net.html
Enjoy and thanks for the support!
--
Fernando Gonzalez Sanchez | Software Engineer |
Oracle MySQL Windows Experience Team, Connector/NET
Guadalajara | Jalisco | Mexico
↧
Bulk Loading Column Mapping (1 reply)
Hi,
Is there any chance to change the field order in mysql bulk loader.
Please let me know if any methods are there.
Thanks,
Kiran Kumar Reddy K
Is there any chance to change the field order in mysql bulk loader.
Please let me know if any methods are there.
Thanks,
Kiran Kumar Reddy K
↧
↧
longtext column problem (2 replies)
Hi,
when reading data from a table with a LONGTEXT column, the MaxLength property of this DataColumn is set to 0 - resulting in a ConstraintException. I did not found a solution or even anyone other having this problem. Am I missing something?
Olaf
version: mysql-connector-net-6.7.4
Code:
Dim connectionString As String = "Server=myserver;Uid=myuser;Pwd=12345;Database=test;"
Using con As New MySqlConnection(connectionString)
con.Open()
Using cmd = con.CreateCommand
cmd.CommandText = _
"DROP TABLE IF EXISTS testtable;" & vbCrLf &
"CREATE TABLE testtable (" & vbCrLf &
" longtextcolumn longtext" & vbCrLf &
");" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 1');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 2');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 3');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 4');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 5');"
cmd.ExecuteNonQuery()
End Using
Using cmd = con.CreateCommand
Dim sql = "SELECT * FROM testtable;"
cmd.CommandText = sql
Using reader = cmd.ExecuteReader
Dim dt As New DataTable()
Try
dt.Load(reader)
Catch ex As ConstraintException
If dt.HasErrors Then
Console.WriteLine("")
For Each errorRow In dt.GetErrors()
Console.WriteLine("RowError: {0}", errorRow.RowError)
Next
End If
End Try
Console.WriteLine("")
Console.WriteLine("{0} rows received:", dt.Rows.Count)
For i = 0 To dt.Rows.Count - 1
Console.WriteLine("row # {0}: '{1}'", i, dt.Rows(i).Item(0))
Next
Console.WriteLine("")
Console.WriteLine("MaxLength of column {0}: {1}", dt.Columns(0).ColumnName, dt.Columns(0).MaxLength)
Console.WriteLine("")
End Using
End Using
End Using
Catch ex As Exception
Console.WriteLine(ex.ToString)
End Try
Console.WriteLine("Press ENTER to exit...")
Console.ReadLine()
Results:
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
5 rows received:
row # 0: 'long text 1'
row # 1: 'long text 2'
row # 2: 'long text 3'
row # 3: 'long text 4'
row # 4: 'long text 5'
MaxLength of column longtextcolumn: 0
when reading data from a table with a LONGTEXT column, the MaxLength property of this DataColumn is set to 0 - resulting in a ConstraintException. I did not found a solution or even anyone other having this problem. Am I missing something?
Olaf
version: mysql-connector-net-6.7.4
Code:
Dim connectionString As String = "Server=myserver;Uid=myuser;Pwd=12345;Database=test;"
Using con As New MySqlConnection(connectionString)
con.Open()
Using cmd = con.CreateCommand
cmd.CommandText = _
"DROP TABLE IF EXISTS testtable;" & vbCrLf &
"CREATE TABLE testtable (" & vbCrLf &
" longtextcolumn longtext" & vbCrLf &
");" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 1');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 2');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 3');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 4');" & vbCrLf &
"INSERT INTO testtable (longtextcolumn) VALUES ('long text 5');"
cmd.ExecuteNonQuery()
End Using
Using cmd = con.CreateCommand
Dim sql = "SELECT * FROM testtable;"
cmd.CommandText = sql
Using reader = cmd.ExecuteReader
Dim dt As New DataTable()
Try
dt.Load(reader)
Catch ex As ConstraintException
If dt.HasErrors Then
Console.WriteLine("")
For Each errorRow In dt.GetErrors()
Console.WriteLine("RowError: {0}", errorRow.RowError)
Next
End If
End Try
Console.WriteLine("")
Console.WriteLine("{0} rows received:", dt.Rows.Count)
For i = 0 To dt.Rows.Count - 1
Console.WriteLine("row # {0}: '{1}'", i, dt.Rows(i).Item(0))
Next
Console.WriteLine("")
Console.WriteLine("MaxLength of column {0}: {1}", dt.Columns(0).ColumnName, dt.Columns(0).MaxLength)
Console.WriteLine("")
End Using
End Using
End Using
Catch ex As Exception
Console.WriteLine(ex.ToString)
End Try
Console.WriteLine("Press ENTER to exit...")
Console.ReadLine()
Results:
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
RowError: Column 'longtextcolumn' überschreitet das MaxLength-Limit.
5 rows received:
row # 0: 'long text 1'
row # 1: 'long text 2'
row # 2: 'long text 3'
row # 3: 'long text 4'
row # 4: 'long text 5'
MaxLength of column longtextcolumn: 0
↧
Perform operations when triggers for table insert happen (1 reply)
Hi,
I'd like to set up a trigger on a table, for INSERT, and when the insert happens, I want to perform some operation.
Thing is, I'll have my APP open, with an open connection to the database/pooling.
How or is it possible to have, or exists in the .NET driver, something that fires when the trigger fires on the MySQL side via the open connection?
I'd like to set up a trigger on a table, for INSERT, and when the insert happens, I want to perform some operation.
Thing is, I'll have my APP open, with an open connection to the database/pooling.
How or is it possible to have, or exists in the .NET driver, something that fires when the trigger fires on the MySQL side via the open connection?
↧
MySQL plugin for Visual Studio -> cannot uninstall!!! (1 reply)
Hi,
I installed MySQL on my Windows 7 laptop. I had installed it in "C:\" and ran fine. I wanted to uninstall it and install it on another drive, i was successful in uninstalling all but one "MySQL for Visual Studio plugin". Now whenever I start the installation process, it will either automatically install it in "C:\" or will exit the installation process because of corrupt plugin!.... I am stuck, I would be grateful If some could help me.
I installed MySQL on my Windows 7 laptop. I had installed it in "C:\" and ran fine. I wanted to uninstall it and install it on another drive, i was successful in uninstalling all but one "MySQL for Visual Studio plugin". Now whenever I start the installation process, it will either automatically install it in "C:\" or will exit the installation process because of corrupt plugin!.... I am stuck, I would be grateful If some could help me.
↧
.NET client via download or NuGet Manager? (2 replies)
Ok, I'm having a problem with MySQL connector not appear in the Data Source dropdown box when adding a new data connection in Visual Studio 2012 Update 3 professional.
Wondering if it matters how I install the MySQL connector. This past attempt I used the Nuget manager to download and install the MySQL Entity Framework / MySQL Connector 6.7.4 addons. The install completed but MySQL still not available in the list of data sources.
I'm currently uninstalling Visual Studio and will do a complete new install and use the downloaded package to see if it provides better results.
Wondering if it matters how I install the MySQL connector. This past attempt I used the Nuget manager to download and install the MySQL Entity Framework / MySQL Connector 6.7.4 addons. The install completed but MySQL still not available in the list of data sources.
I'm currently uninstalling Visual Studio and will do a complete new install and use the downloaded package to see if it provides better results.
↧
↧
v6.7.4 Unable to find .Net Framework Data Provider (9 replies)
Brand new install of Visual Studio 2013 Update 3.
Downloaded and installed the following MySQL packages:
1) mysql-connector-net-6.7.4
2) mysql-installer-web-community-5.6.12.0
When adding a new data connection the "Test Connection" works but when clicking OK "Unable to find the requested >Net Framework Data Provider" error is displayed.
All the information I've searched for on this issue appears to be outdated. Any help is appreciated.
Downloaded and installed the following MySQL packages:
1) mysql-connector-net-6.7.4
2) mysql-installer-web-community-5.6.12.0
When adding a new data connection the "Test Connection" works but when clicking OK "Unable to find the requested >Net Framework Data Provider" error is displayed.
All the information I've searched for on this issue appears to be outdated. Any help is appreciated.
↧
v6.7.4 installed, but 6.6.5.0 attempted to load. (6 replies)
After installing Connector/Net 6.7.4 onto my machine with Visual Studio 2012 Patch 3, EF 5.0, .Net 4.5 & MySQL for Visual Studio 1.0.2, my test app is unable to open a connection to the datasource. The unraised exception (visible by inspecting the local dbcontext variable) is a System.IO.File.LoadException type complaining about "Could not load file or assembly 'MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d', which is the previous version of the connector that was installed.
I have found a reference to v6.6.5 version of C/Net in the machine.config in the DBProvidorFactories section. I'm not sure that this is the only one or the ultimate culprit. The install files for 6.6.5 package have been removed.
Have I missed a step in the installation? Is there something Ineed to do to force the use of v6.7.4?
Thanks in advance,
Hugh
I have found a reference to v6.6.5 version of C/Net in the machine.config in the DBProvidorFactories section. I'm not sure that this is the only one or the ultimate culprit. The install files for 6.6.5 package have been removed.
Have I missed a step in the installation? Is there something Ineed to do to force the use of v6.7.4?
Thanks in advance,
Hugh
↧
Error Unable to find the requested .Net Framework Data Provider. It may not be installed. (4 replies)
Hi all.
I'm install MySql Connector 6.7.4 over NuGet. I'm create connection string in App.Config:
<connectionStrings>
<add name="TodoContext" connectionString="server=localhost;uid=todo;database=todo;Pwd=xxxxxx;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
After run i'm get error: Unable to find the requested .Net Framework Data Provider. It may not be installed.
In this code:
var db = new TodoContext();
db.Todoes.Add(new Todo()
{
Text = "Test task #" + new Random().Next(),
DueDate = DateTime.Now,
Priority = new Random().Next(),
CreateTime = DateTime.Now,
Description = "bla bla bla"
});
Error fire on Add line. Please help me resolve it problem.
I'm install MySql Connector 6.7.4 over NuGet. I'm create connection string in App.Config:
<connectionStrings>
<add name="TodoContext" connectionString="server=localhost;uid=todo;database=todo;Pwd=xxxxxx;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
After run i'm get error: Unable to find the requested .Net Framework Data Provider. It may not be installed.
In this code:
var db = new TodoContext();
db.Todoes.Add(new Todo()
{
Text = "Test task #" + new Random().Next(),
DueDate = DateTime.Now,
Priority = new Random().Next(),
CreateTime = DateTime.Now,
Description = "bla bla bla"
});
Error fire on Add line. Please help me resolve it problem.
↧
[Solved outside transaction] Impossible to read a MySqlCommand (2 replies)
Hello everybody,
Perhaps somebody will advise me a better adapted forum ?
I am working on a ProfileProvider that I found on CodeProject, as it now appears it does not work. I do not remember exactly whether it worked properly the first time I tried it, but now the profile is not saved.
So, it appears at a few points a different syntax gets a better results, but I am disturbed at a point, where the topic is to get the PKID of the user, given his UserName.
cmd.ExecuteScalar returns null, whereas there is a record in the User table matching the criteria. If I run the same syntax in a separate Windows project it returns the correct PKID, but in the website no.
So, in a Page_Load, I insert this code, and I display the details of the conn object in the execute window, and it tells that conn.ServerThread threw a Null Reference Exception. Of course, if the connection runs in no thread, it is no miracle that I cannot get the data.
Hereunder is the code. Do you have an idea of a mistake I could do when installing that provider ?
(sorry for the absence of indentation)
In the Page_Load (for test purposes) :
ConnectionStringSettingsCollection connectionStrings =
ConfigurationManager.ConnectionStrings;
string _connectionString = connectionStrings["VentesConnectionString"].ConnectionString;
MySqlConnection conn = new MySqlConnection(_connectionString);
SettingsContext sc = Profile.Context;
string username = (string)sc["UserName"];
bool userIsAuthenticated = (bool)sc["IsAuthenticated"];
MySqlCommand cmd =
new MySqlCommand("SELECT PKID FROM Users WHERE UserName = '" + username + "'", conn);
In the web.config :
<profile enabled="true" defaultProvider="MySQLProfileProvider">
<properties>
<add name="panier" type="String" allowAnonymous="true"/>
</properties>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ApplicationServices" applicationName="/" />
<add name="MySQLProfileProvider" type="Malachi.MySqlProviders.MySqlProfileProvider"
connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
Oh, and I presume this can be important : MySql was installed on Windows XP Home SP3 with mysql-installer-community-5.6.12.0.msi. About the connector, I should say I installed it with mysql-connector-net-6.7.4.msi, despite Visual Studio 2005 reports MySql Connector/Net 5.2
I should like to find a connector that works with Visual Web Developer Express 2010, but this is not the same topic.
Perhaps somebody will advise me a better adapted forum ?
I am working on a ProfileProvider that I found on CodeProject, as it now appears it does not work. I do not remember exactly whether it worked properly the first time I tried it, but now the profile is not saved.
So, it appears at a few points a different syntax gets a better results, but I am disturbed at a point, where the topic is to get the PKID of the user, given his UserName.
cmd.ExecuteScalar returns null, whereas there is a record in the User table matching the criteria. If I run the same syntax in a separate Windows project it returns the correct PKID, but in the website no.
So, in a Page_Load, I insert this code, and I display the details of the conn object in the execute window, and it tells that conn.ServerThread threw a Null Reference Exception. Of course, if the connection runs in no thread, it is no miracle that I cannot get the data.
Hereunder is the code. Do you have an idea of a mistake I could do when installing that provider ?
(sorry for the absence of indentation)
In the Page_Load (for test purposes) :
ConnectionStringSettingsCollection connectionStrings =
ConfigurationManager.ConnectionStrings;
string _connectionString = connectionStrings["VentesConnectionString"].ConnectionString;
MySqlConnection conn = new MySqlConnection(_connectionString);
SettingsContext sc = Profile.Context;
string username = (string)sc["UserName"];
bool userIsAuthenticated = (bool)sc["IsAuthenticated"];
MySqlCommand cmd =
new MySqlCommand("SELECT PKID FROM Users WHERE UserName = '" + username + "'", conn);
In the web.config :
<profile enabled="true" defaultProvider="MySQLProfileProvider">
<properties>
<add name="panier" type="String" allowAnonymous="true"/>
</properties>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ApplicationServices" applicationName="/" />
<add name="MySQLProfileProvider" type="Malachi.MySqlProviders.MySqlProfileProvider"
connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
Oh, and I presume this can be important : MySql was installed on Windows XP Home SP3 with mysql-installer-community-5.6.12.0.msi. About the connector, I should say I installed it with mysql-connector-net-6.7.4.msi, despite Visual Studio 2005 reports MySql Connector/Net 5.2
I should like to find a connector that works with Visual Web Developer Express 2010, but this is not the same topic.
↧
↧
insert in dB string whit 8bit caracter (no replies)
Dear Forum
via serial port i receive number from 0 to 255. Using C# i can convert
in string using the extended encoding,so all in not cutted to 7 bit .
Of course the string now show very unreadeble caracter.
I want memory this string, long 500 char, in a rows of varchar(500).
Operation is good only ..seems..if the string contain 7 bit caracter ,but give error if contain extended character.
Problem is sure because insert need "" as delimeter of value ,and this can be false generated from some char in the string of ascii value= ".
What can i do ?
1 idea is to translate all string in exadecimal value, so i have only 7 bit char
Es HELLO ---> 48h 45h 4Ch 4Ch 4Fh
Some idea better ?
Many thanks
Roberto
via serial port i receive number from 0 to 255. Using C# i can convert
in string using the extended encoding,so all in not cutted to 7 bit .
Of course the string now show very unreadeble caracter.
I want memory this string, long 500 char, in a rows of varchar(500).
Operation is good only ..seems..if the string contain 7 bit caracter ,but give error if contain extended character.
Problem is sure because insert need "" as delimeter of value ,and this can be false generated from some char in the string of ascii value= ".
What can i do ?
1 idea is to translate all string in exadecimal value, so i have only 7 bit char
Es HELLO ---> 48h 45h 4Ch 4Ch 4Fh
Some idea better ?
Many thanks
Roberto
↧
MySqlCommand : impossible to read inside a transaction (no replies)
Hello everybody,
Let us suppose I want to get the id of a user, knowing his name, that will be done like that :
conn.Open();
MySqlCommand cmd =
new MySqlCommand("SELECT PKID FROM Users WHERE UserName = '" + username + "'", conn);
MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow);
reader.Read();
string strPkId = reader.GetString(0);
reader.Close();
But in the ProfileProvider that you find on Code Project, this is done in a transaction, so the MySqlCommand receives a third argument, with the transaction.
I presume that worked initially, but now, on Windows XP Home SP3, with MySql installed with mysql-installer-community-5.6.12.0.msi and mysql-connector-net-6.7.4.msi (oh, nevertheless Visual Studio 2005 reports using Connector Net 5.2), that does not work. reader.Read() returns false, and reader.GetString(0) throughs an exception that tells "Invalid attempt to access a field before calling Read()".
Same problem with cmd.ExecuteScalar(), that was used initially.
It works properly if called before opening a transaction, so with only two arguments to MySqlCommand, this is why I ask the question here : I imagine it is possible to read data inside a transaction, what must I modify in the code ?
Let us suppose I want to get the id of a user, knowing his name, that will be done like that :
conn.Open();
MySqlCommand cmd =
new MySqlCommand("SELECT PKID FROM Users WHERE UserName = '" + username + "'", conn);
MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow);
reader.Read();
string strPkId = reader.GetString(0);
reader.Close();
But in the ProfileProvider that you find on Code Project, this is done in a transaction, so the MySqlCommand receives a third argument, with the transaction.
I presume that worked initially, but now, on Windows XP Home SP3, with MySql installed with mysql-installer-community-5.6.12.0.msi and mysql-connector-net-6.7.4.msi (oh, nevertheless Visual Studio 2005 reports using Connector Net 5.2), that does not work. reader.Read() returns false, and reader.GetString(0) throughs an exception that tells "Invalid attempt to access a field before calling Read()".
Same problem with cmd.ExecuteScalar(), that was used initially.
It works properly if called before opening a transaction, so with only two arguments to MySqlCommand, this is why I ask the question here : I imagine it is possible to read data inside a transaction, what must I modify in the code ?
↧
Entity framework with mysql (12 replies)
Hello,
im trying to use EF with MySQL(part of my final paper). So I download mysql-installer-web-community-5.7.1.3-m11.msi (its dev version because official gace mi constant exception when i was trying to choos what to install) and with it i installed tool for visual studio 2012. With this i generated new Data model(edmx, context etc.) from my MySql db - so far so good.
Then i installed via NuGet MySql.Data and MySql.Data.Entities(version 6.7.4 and 6.7.4.1) and created conn string and DbProviderFactories :
<connectionStrings>
<add name="classicmodelsEntities" connectionString="metadata=res://*/mysql.Model1.csdl|res://*/mysql.Model1.ssdl|res://*/mysql.Model1.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=Password;persist security info=True;database=classicmodels"" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<DbProviderFactories>
<!--<remove invariant="MySql.Data.MySqlClient" />-->
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
</DbProviderFactories>
but when i create context i got error:
Unable to find the requested .Net Framework Data Provider. It may not be installed
when i change my connstring so it will use providerName="System.Data.EntityClient"
The specified store provider cannot be found in the configuration, or is not valid
uncommenting remove invariant doesnt help. i tried also downloading connectormysql-connector-net-6.7.4.msi and install it but it doesnt help either.
Any ideas?
im trying to use EF with MySQL(part of my final paper). So I download mysql-installer-web-community-5.7.1.3-m11.msi (its dev version because official gace mi constant exception when i was trying to choos what to install) and with it i installed tool for visual studio 2012. With this i generated new Data model(edmx, context etc.) from my MySql db - so far so good.
Then i installed via NuGet MySql.Data and MySql.Data.Entities(version 6.7.4 and 6.7.4.1) and created conn string and DbProviderFactories :
<connectionStrings>
<add name="classicmodelsEntities" connectionString="metadata=res://*/mysql.Model1.csdl|res://*/mysql.Model1.ssdl|res://*/mysql.Model1.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=Password;persist security info=True;database=classicmodels"" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<DbProviderFactories>
<!--<remove invariant="MySql.Data.MySqlClient" />-->
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
</DbProviderFactories>
but when i create context i got error:
Unable to find the requested .Net Framework Data Provider. It may not be installed
when i change my connstring so it will use providerName="System.Data.EntityClient"
The specified store provider cannot be found in the configuration, or is not valid
uncommenting remove invariant doesnt help. i tried also downloading connectormysql-connector-net-6.7.4.msi and install it but it doesnt help either.
Any ideas?
↧