Re: Argument type 'MySql.Data.MySqlClient.MySqlTransaction' is not CLS-compliant
Posted by: Klaus E. Frederiksen
Date: November 13, 2005 01:15PM

Hi

Did a littele research on this, because I also had the same problem, trying to rewrite the Microsoft.ApplicationBlocks.Data to use the MySQL connector instead.

If You have the Source code for the MySQL .NET connector, You can change the [assembly: CLSCompliant(false)] to [assembly: CLSCompliant(true)] and the C# compiler will point out the reasons for the CLS-compliant errors.

The primary reason for this error, a least that I found, is the data types used in the MySQLParameter class, where MySQL is using usigned datatypes, and as far as I have read, usigned types is not allowed if the code has to be CLS-Complient.

So I removed the usigned types from the class (comment them out) and changed some minor uint types and the code compiled with no remarks on the CLS-complient matter. Ofcause if You use usigned data types, You have to find another way.

Regards
Objecta

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.