I'm developing a C#.NET web application that will use MySQLDirect.net to access a MySQL database on a Linux system using stored procedures.
I have the identical MySQL database running on Windows without any problems - I can use both mycommand.ExecuteNonQuery and mycommand.ExecuteReader on the Windows System using MySQLDirect.NET
On the Linux box the ExecuteNonQuery works just fine, however I am unable to get any data from the ExecuteReader. (In the debugger I have verified that the connection strings are working!)
This could be caused by me using the wrong commands - or there may be a setting required on the Linux MySQL box before the ExecuteReader will work. (Help!)
I have attached the code that I am using - the ExecuteReader works fine on Windows and it returns data, on Linux it is trapped by the "catch".
If anyone has any suggestions they would be greatly appreciated!
Thanks,
Fred
-----------------------
Code: Select all
public MySqlDataReader memoryctlgetallnew()
        {
            MySqlConnection myConnection = new MySqlConnection();
            myConnection.ConnectionString = "server=90.0.0.26;uid=webserv;pwd=webpass;database=mycsport_dbo;";
            MySqlCommand myCommand = new MySqlCommand("memoryctlgetall", myConnection);
            myCommand.CommandType = CommandType.StoredProcedure;
            try
            {
                myConnection.Open();
                return  myCommand.ExecuteReader(CommandBehavior.CloseConnection);
            }
            catch
            {
                return null;
            };
        }