[Mono-dev] Mono and MySql.Data problem - System.Transactions

SamHellawell samlikeswilly at live.co.uk
Mon May 16 16:58:41 EDT 2011


Hey there! 

So basically, after hours setting up my Ubuntu VPS to get Mono to run my
application (CLI), I get this error when trying to use MySQL: 

[ERROR] MySQL getCommand: Invalid IL code in
System.Transactions.Transaction:get_Current (): method body is empty. 
[ERROR] MySQL getString: Object reference not set to an instance of an
object 

The getString method generates a command from getCommand, which is: 
        public MySqlCommand getCommand(string query) 
        { 
            try 
            { 
                if (connection.State != System.Data.ConnectionState.Closed) 
                { 
                    connection.Close(); 
                } 

                MySqlCommand command = newCommand(); 
                command.CommandText = query; 
                connection.Open(); 
                return command; 
            } 
            catch (Exception e) 
            { 
                Log.Error("MySQL getCommand: " + e.Message); 
                return null; 
            } 
        } 

The method newCommand() just returns connection.CreateCommand() - something
along those lines, don't have the source here.

Anybody have any ideas? I've tried uninstalling and install mono, many types
of MySql.Data (in gac also). 

Thanks, Sam.

--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-and-MySql-Data-problem-System-Transactions-tp3527428p3527428.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list