Mysql Type Enumeration - Passing Unsigned Int

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 1
Joined: Wed 27 Jan 2010 12:12

Mysql Type Enumeration - Passing Unsigned Int

Post by ganesan » Wed 27 Jan 2010 12:19

I am trying to pass a very long integer stored as unsigned int in Database. The integer value is greater than the limit of Signed Integer. Is there any way of passing a parameter and tell that it is unsigned integer. The documentation does not provide a way to specify unsigned int


Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 27 Jan 2010 14:28

MySqlType.BigInt represents both signed and unsigned 64-bit integers. The code for inserting an unsigned integer to the database should look like the following:

Code: Select all

UInt64 Int = UInt64.MaxValue;
MySqlCommand command = new MySqlCommand("Insert into UInt_Table values (?)", mySqlConnection1);

Post Reply