Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all 1447 articles
Browse latest View live

ENTRY POINT NOT FOUND (no replies)

$
0
0
I am getting an error everytime I try to execute a stored procedure from a C# program. The error is "Entry point not found." Here is the code:
MySqlCommand cmd = new MySqlCommand("UPDATEBLOB", db.msConn);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add(new MySqlParameter("uniqueKey", ct.uniqueKey));
cmd.Parameters.Add(new MySqlParameter("blobData", createBlob(ct.actualFileLocation)));
int rc = cmd.ExecuteNonQuery();

On the last line (ExecuteNoNQuery) is where I get this error. I have uninstalled and reinstalled MYSQL, checked all of the DLL's and cannot find the reason for this. Does anyone have any ideas? (Please). I have checked and am using 6.6.5 of the connectors - i.e. C:\Program Files\MySQL\MySQL Connector Net 6.6.5\Assemblies\v4.0\MySql.Data.dll

Unknown column 'Distinct1.nCdSite' in 'where clause' (1 reply)

$
0
0
Good evening, I'm two days trying to solve this problem and got nothing. I am suspicious that it is a bug, could someone help me? I am getting the following error message.

Unknown column 'Distinct1.nCdSite' in 'where clause'

[MySqlException (0x80004005): Unknown column 'Distinct1.nCdSite' in 'where clause']
MySql.Data.MySqlClient.MySqlStream.ReadPacket() +501
MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +450
MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +136
MySql.Data.MySqlClient.MySqlDataReader.NextResult() +1269
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +2528
MySql.Data.Entity.EFMySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +22
.
.
.

I have the following code

[Table("pagina")]
public class pagina
{
[Key]
public long nCdPagina { get; set; }
public long nCdVisitante { get; set; }
public string sDsUrlReferencia { get; set; }
public string sDsPalavraChave { get; set; }
public string sDsTitulo { get; set; }

[ForeignKey("nCdVisitante")]
public visitante visitante { get; set; }
}

public class retorno
{
public long Key { get; set; }
public int Online { get; set; }
}

[Table("site")]
public class site
{
[Key]
public long nCdSite { get; set; }
public string sDsTitulo { get; set; }
public string sDsUrl { get; set; }
public DateTime tDtCadastro { get; set; }
}
}

[Table("visitante")]
public class visitante
{
[Key]
public long nCdVisitante { get; set; }
public long nCdSite { get; set; }
public string sDsIp { get; set; }
public DateTime tDtCadastro { get; set; }
public DateTime tDtAtualizacao { get; set; }

[ForeignKey("nCdSite")]
public site site { get; set; }
}


return (from pag in this.context.pagina.Include("visitante").Include("site")
group pag by pag.visitante.nCdSite into g
select new retorno
{
Key = g.Key,
Online = g.Select(e => e.visitante.sDsIp).Distinct().Count()
}).ToList<retorno>();

The problem only occurs when I place. Distinct (). Count () if let alone. Count () works perfectly.

Help please

Unable to convert MySQL date/time value to System.DateTime (1 reply)

$
0
0
Hi,

I am getting " Unable to convert MySQL date/time value to System.DateTime" Error. Even I have added "Allow Zero Datetime=true" to connection string.

I am using MYSQL 5.1.48 version and .NET 4.0.3 for building application.

Even data in DB also good. Please help what might be causing the error.


Thanks
Umesh

Connection in Medium Trust Site (7 replies)

$
0
0
I just installed .Net Connector 6.6.5 and have tried to connect to a MySql database locally and deployed to my site but get the error message:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I’m using Asp.net with a one page application which only try’s to connect to a database. I’m not using Entity Framework or any other third party tools.
From what I have read the provider must configure their server to allow the 6.6.5 connector to work. However my provider (Go Daddy) will not make any changes in the shared environment so it looks like that option will not work.
I also installed the latest version of the “Workbench” and have been able to connect, make changes to the schema and query the database. How is the Workbench software connecting?
I have read numerous articles describing how to modify source and recompile but I’m not interested in using outdated or hacked software.
Can anyone direct me to a working sample Asp.net application which will connect, query and update data in a MySql database?
Thank you
Terry c.

On Demand Starting of MySQL Instance (5 replies)

$
0
0
I have a few users who currently have at least one MySQL database running on their machines. I am working on a program in VB.Net 2010 that needs a database to store information. I have been reading that it is possible to have more than one instance of the MySQL server running.

I have been experimenting but cannot figure out how to start an instance of MySQL with VB 2010 on demand. I believe that I have to start my instance with it's own port and since the other databases run on the default port 3306, I was thinking I should use a different one. I am not sure how to pass the correct options to the mysqld program. I am not sure if I should be using a --defaults-file option or --init-file option.

Can someone point me in the right direction with some VB code and which port I should use? I need to be able to start my own server as well as stop it without interrupting the other MySQL instance. TIA, rasinc

Host '192.168.1.5' is not allowed to connect to this MySQL server (no replies)

$
0
0
Hi,

Im trying to connect the MySQL Database from ASP.NET web application to another machine. Im unable to connect that machine using MySQL Workbench.

Connection String:
------------------
<connectionStrings>
<add name="MySqlDBConnection" providerName="MySql.Data.MySqlClient" connectionString="Server=192.168.1.5,Port=3306;database=databasename;Character Set=utf8;User id=root;password=password;"/>
</connectionStrings>

I gave permission to the database im trying to connect as below
mysql> use mysql; // also i gave to current database im connection
mysql> GRANT ALL ON *.* to root@'192.168.1.5' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;

Please let me know what went wrong in connecting to the database from my ASP.NET application, but the application is connecting by using local MySQL database.

Thnks,
Senthil.

Default values - VB.NET (no replies)

$
0
0
I am using the 6.6.5 MySql.data connector.
One of the fields is defined as a smallint with a default of 180.
If I create a record with the MySql Query browser (and don't enterthis field). It yields the value of 180.
If I edit using VB.NET and a DataGridView, the new record is null.
How do I get the connector to respect the default values?

Thanks,

Gary

TimeZone in Connection String Parameters (1 reply)

$
0
0
Is there any such feature to set the timezone in the connection string? Or perhaps session variables?

I didn't find much in the docs for the .NET Connector, but I might have missed it. I know such a feature exists in the Java Connector for setting session variables per connection. My intention is simply to set the time_zone to UTC per connection rather than forcing the setting in the server.

C# error connect MySql on windows 8 (no replies)

$
0
0
DEAR SRI

I Programming C# connect MySQL on windows8. Program Cannot connect to MySQL

Exp Code:

string _myconString = "Server=localhost;Database=set;Uid=root;Pwd=password;";

AddWithValue (no replies)

$
0
0
Hello, everybody.
I am trying to make this simple code to pass actual value to the command parameter. Instead, all I am getting in the table is Null.

CorpConn = New MySqlConnection(MySQLConnectStr)
SQL = "INSERT INTO Log_Staff_LoginTime" + _
" (CallName) VALUES(@CallName);"
WrkCmd = New MySqlCommand(SQL, CorpConn)
WrkCmd.Parameters.AddWithValue("@CallName", "John")
CorpConn.Open()
WrkCmd.ExecuteNonQuery()
CorpConn.Close()

Even if my life depended on it, I can't see what I am doing wrong here. Please help!!!
Larry

Help with VBA & mySQL Workbench (2 replies)

$
0
0
Hi Guys,

This is my first post on here so please be nice!

Firstly let me say that I am new to using mySQL workbench however I have a good knowledge of VB programming.

I am looking to implement an SQL database that will be accessed using VB code.

I have found a few websites/forums out there with similiar questions however I still find myself stuck in getting started!

Currently I am using the following code to create a connection with my SQL server.. (Found on: http://stackoverflow.com/questions/14575422/open-connection-mysql-vba-excel-2007)

I have Microsoft ActiveX Objects 6.1 Library Reference currently selected in VBA (Excel), however I have tried the code using the 2.8 Objects library to no avail.

--------------------------------------------
Sub test123()

  ' Connection variables
  Dim conn As New ADODB.Connection
  Dim server_name As String
  Dim database_name As String
  Dim user_id As String
  Dim password As String

  ' Table action variables
  Dim i As Long ' counter
  Dim sqlstr As String ' SQL to perform various actions
  Dim table1 As String, table2 As String
  Dim field1 As String, field2 As String
  Dim rs As ADODB.Recordset
  Dim vtype As Variant

  '----------------------------------------------------------------------
  ' Establish connection to the database
  server_name = "127.0.0.1" ' Enter your server name here - if running from a local       computer use 127.0.0.1
  database_name = "smss" ' Enter your database name here
  user_id = "root" ' enter your user ID here
  password = "" ' Enter your password here

  Set conn = New ADODB.Connection
  conn.Open "DRIVER={MySQL ODBC 5.2a Driver}" _
    & ";SERVER=" & server_name _
    & ";DATABASE=" & database_name _
    & ";UID=" & user_id _
    & ";PWD=" & password _

  ' Extract MySQL table data to first worksheet in the workbook
  GoTo skipextract
  Set rs = New ADODB.Recordset
  sqlstr = "SELECT * FROM inbox" ' extracts all data
  rs.Open sqlstr, conn, adOpenStatic
  With Sheet1(1).Cells ' Enter your sheet name and range here
    .ClearContents
    .CopyFromRecordset rs
  End With
  skipextract:

End Sub
'----------------------------------------------

I am using Excel 2013 edition on windows 8, MySQL Workbench v5.2.47



I have created a local server and I am simply wishing to create a connection to this server, retrieve all the values out of one table and paste them onto one excel worksheet.

The Model file name is "Jordan", the Table in this Model is titled "Role"

If you wish for me to provide further details please let me know - this will probably require you explaining how I find/ navigate to them on the mySQL workbench program.


If you could please provide some assistance that would be great. I am a quick learner and once I get over this hurdle I will be on my way to developing some interesting Applications using mySQL databases! :)

Regards
Jordan

MySQL Connector/Net 6.7.0 Alpha has been released (no replies)

$
0
0
MySQL Connector/Net 6.7.0, a new version of the all-managed .NET driver for MySQL has been released. This is the first of two alpha releases intended to introduce users to the new features in the release. This release is not feature complete and there are significant limitations but it should be stable enough for users to understand the new features and how we expect them to work. As is the case with all non-GA releases, it should not be used in any production environment. It is appropriate for use with MySQL server versions 5.0-5.6

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:

- 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) will be released in a separated plugin for Visual Studio product.

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.
A known issue is that in this release you'll need to use MySql.Data.Entity assembly for .NET 4.0 with EF 5, in the future we will include a version of that assembly for .NET 4.5.

Memcached
-------------------------------------------
Just setup Innodb memcached plugin and use Connector/NET new APIs to establish a client to MySql 5.6 server's memcached daemon.

Enjoy and thanks for the support!

Error when connecting a new database on VS 2010 (1 reply)

$
0
0
I followed steps in : http://dev.mysql.com/doc/refman/5.6/en/connector-net-visual-studio-making-a-connection.html

it fails on step: 21.3. Add Connection Dialog.

when i click the database name field it display a messagebox says: "Unable to retreive list of databases". However if i put a new name on it & click Test Connection an error message occur say: "The system detect an invalid pointer address in attempting to use a pointer argument in a call".

I really have no idea, Please , anyone can help & guid me?

MySQL Connector/Net 6.5.6 Maintenance Release has been released (no replies)

$
0
0
MySQL Connector/Net 6.5.6, a new maintenance release of our 6.5 series, has been released. This release is GA quality and is appropriate for use in production environments. Please note that 6.6 is our latest driver series and is the recommended product for development. 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.)

While 6.5.6 is recommended over 6.5.5, for the most feature complete & stable Connector/NET version for production we recommend 6.6.5.

The 6.5.6 version of MySQL Connector/Net brings the following fixes:
- Fix internal bug "Parser cannot recognize row_count in grammar version 5.6" (id task 326).
- Fixed missing keywords not working as ids (without quoting) in parser: value, status, unknown & some unit tests.
- Fix for Datetime precision doesn't work with code first or model first. (Oracle bug #15972773).
- Fix for Support for current_timestamp as default for datetime with ef for server 5.6 (Oracle bug #15935094).
- Adding support for Geometry type. Unit Tests included. Supporting server 5.1 and further.
- Added support for new connect attributes feature in server 5.6 (Oracle bug #15935112).
- Added protocol support for password expiration (Oracle bug #15935104).
- Added to parser missing "alter user ... password expire".
- Fix for "Debugger error on stored procedure", which is actually a parser bug (parser was expecting decimal both precision & scale),
(bug MySql #67975, Oracle bug #16079735).
- Added support for password hashing with appropriate strength for server 5.6 (Oracle bug #15935128).
- Fix for GetSchema returning MySqlException instead of ArgumentException when passing an invalid collection name
(Oracle bug #16271425, MySql bug #67901).
- Fix for EF 4.3 failing when FK identifiers are too long (MySql bug #67285, Oracle bug #16286397).
- Fix for race condition on ConnectionStringBuilder when using multiple threads
(MySql bug #68217, Oracle bug #16310698).
- Fix for stored routines being edited from Server explorer appear as ALTER, which may led
to syntax errors, which may led to Intellisense to stop working (Oracle bug #16357595).
- Fix for Error in Server Explorer when refreshing a table or view (Oracle bug #16363908).
- Fix for Intellisense not available for Views (Oracle bug #16384218).
- Fix for "When saving a new stored procedure, it raises a windows error message", due to
using definer (Oracle bug #16363828).
- Fix for "The first time a new stored routine is saved, after save, Intellisense doesn't work (Oracle bug #16384238).
- Fix for "Error when saving after changing an existing stored routine name in SQL in the editor" (Oracle bug #16390757).
- Fix for server explorer error opening a remote connection (Oracle bug #16357786).
- Fix for password expiration, new password dialog failed (Oracle bug #16357752).
- Fix for InvalidCastException thrown when executing an stored function (MySql bug #64633, Oracle bug #13864627).
- Fix for Default Command Timeout not applying for EFMySqlCommand (MySql bug #67171, Oracle bug #14825670).


The release is available to download at
http://dev.mysql.com/downloads/connector/net/6.5.html

Documentation
You can view current Connector/Net documentation
at http://dev.mysql.com/doc/refman/5.5/en/connector-net.html

You can find our team blog at http://blogs.oracle.com/MySQLOnWindows.
You can also post questions on our forums at http://forums.mysql.com/.

Enjoy and thanks for the support!

CANNOT INSTALL MYSQL CONNECTOR/NET 6.6.5 (3 replies)

$
0
0
Hi, i had a problem uninstalling the mysql connector/net.. i followed the instructions given in the forum on using regedit to remove it. it removed succcessfully. now i am trying to reinstall mysql 6.6.5 and only the connector/net 6.6.5 doesnt want to install it says install error. ANY HELP PLEASE?? i am on windows server 2003 service pack 1

MySql (Connector 6.6.5) not listed in VS2012 ultimate data source list (2 replies)

MySQL Connector/Net 6.7.1 Alpha 2 has been released (no replies)

$
0
0
MySQL Connector/Net 6.7.1, a new version of the all-managed .NET driver for MySQL has been released. This is the second of two alpha releases intended to introduce users to the new features in the release. This release is not feature complete and there are significant limitations but it should be stable enough for users to understand the new features and how we expect them to work. As is the case with all non-GA releases, it should not be used in any production environment. It is appropriate for use with MySQL server versions 5.0-5.6

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:

- 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) will be released in a separated plugin for Visual Studio product.

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.

The following bug fixes are provided in this 6.7.1 release:
- Fix for Bug Assemblies for .net 4.5 are not included in the installation (Oracle Bug #16463655).
- Fix for Bug Geometry Provider Incompatible Exception (Oracle Bug # 16453250).


Enjoy and thanks for the support!

License Issues When Using With NHibernate And Multiple DB Types (no replies)

$
0
0
I wish to distribute mysql connector with my commercial application which uses nhibernate to target multiple Data base types and mysql happens to be one of them. I want to give my clinets the choice of DB they wish to use at install time. I do not want to put them in the hassel of downloading the connector themselves and copying it to software installation directory.So, it would be more comfortable for me to package the mysql connector along with the application. Since my application dose not depends on mysql in two ways: a) My app targets multiple DBs and it will run with or without mysql connector, b) My app talks to mysql connector through NHibernate which is distributed under LGPL. So kindly advice if one of these reasons is good enough to distribute mysql connector without paying for license. Also, I read on some forum that if I sign up with mysql or oracle I can distribute the connector with my commercial aplication freely, please advice if it's correct since I have already signed up with you, otherwise I will not be able to post this message.
Best regrds,
Himashu

MySqlBulkLoader BIT columns (no replies)

$
0
0
How do I handle bit columns when using the MySqlBulkLoader columns... in the source data file, i have tried the following which ALWAYS results in a TRUE value in the table....

FALSE
false
False
0

None of these will actually produce a BIT column value of 0 in the table... it always shows up as a 1.

How can I store false or ZERO values in the BIT column in the table via MySqlBulkLoader... Thanks in advance! :)

How To: Storing and retrieving spatial data on MySQL server with Connector/Net (no replies)

$
0
0
Spatial data is being more used and needed at a larger number of applications. This type of data is not always easy to be managed or queried. And sometimes calculations need to be done in the application code instead of doing them at the server. Recently we added a new class to manage spatial data with Connector/Net, so our users can have the option to handle spatial data operations at their application code.

Post link: https://blogs.oracle.com/MySqlOnWindows/entry/howto_storing_and_retrieving_spatial

Looking forward to your feedback.
Viewing all 1447 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>