2

Does anyone have a complete table of MySQL datatypes mapping to .Net (CLR) datatypes. There are question on the same topic on StackOverflow but the information given is inconsistent rather useless.

3 Answers 3

3

Here is a mapping to Java types, it is easy to convert this to .NET mapping...

http://dev.mysql.com/doc/connector-j/en/connector-j-reference-type-conversions.html

Sign up to request clarification or add additional context in comments.

Comments

1

Just a tip: You may easily create the mapping table by creating a MySql table with MySqltyped columns and then retrieving it from the .net provider. Then just introspect the .net type (in the DataReader or DataTable) of the column.

Comments

0

I found this mapping, seems to be from 2013 (blogspot.dk)

mapping

And I can add that MySql tinyint(1) is mapped automatically to boolean in .Net

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.