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

Update from 6.3.6 to 6.5.4 all stored procedure won't work (no replies)

$
0
0
Hi,

I have update the connector to 6.5.4 on my W7 64 bit VS2010 and all stored procedure won't work and crash with this error message:

Error has occurred on: sp_CountAllXXX: MySql.Data.MySqlClient.MySqlException (0x80004005): FUNCTION mydb.xxxxxx does not exist

If I deinstall the 6.5.4 connector and install the old one 6.3.6 and everything works fine.

For example:

I create an new MVC3 project in VS and create a new procedure on my Database.

Simple procedure:
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_CountingCrows`(OUT `iCount` INT)
	LANGUAGE SQL
	NOT DETERMINISTIC
	READS SQL DATA
	SQL SECURITY DEFINER
BEGIN
    SET iCount = (SELECT COUNT(1) FROM tbl_crows);
END

In VS c#:

public static string GetAllCrows()
        {
            string AllCrows = String.Empty;
            MySqlCommand cmd = new MySqlCommand("sp_CountingCrows", new MySqlConnection(GetConnStr()));
            try
            {
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add(new MySqlParameter("@iCount", MySqlDbType.Int32));
                cmd.Parameters["@iCount"].Direction = ParameterDirection.ReturnValue;
                cmd.Connection.Open();
                cmd.ExecuteNonQuery();
                AllCrows = string.Format("{0:0,0}", cmd.Parameters["@iCount"].Value);
            }
            catch (Exception ex)
              {
                  throw new ArgumentException("Error has occurred on: sp_CountingCrows:\r\nMessage: " + ex.Message);
            }
            finally 
            {
                if (cmd.Connection.State == ConnectionState.Open)
                {
                    cmd.Connection.Close();
                }
            }

            return AllCrows;
        }

Connector 6.5.4:
Error has occurred on: sp_CountingCrows: MySql.Data.MySqlClient.MySqlException (0x80004005): FUNCTION mydb.sp_CountingCrows does not exist

Connector 6.3.6:
Works fine.

Has anyone a hint for me?

Axel

Viewing all articles
Browse latest Browse all 1447

Trending Articles



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