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
Thanks
Mysql Type Enumeration - Passing Unsigned Int
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
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);
command.Parameters.Add("param1",Int);
command.ExecuteNonQuery();