Posted on: 9/23/2012 3:03:13 AM | Views : 220

SQL 2008 express. C#, LINQ.
I'm trying to insert an int value to this tinyint field FLD, but got error:
Cannot implicitly convert type 'int' to 'byte'. an explicit conversion exists(are you missing a cast?)
int Num;
Num = Int32.Parse(ddFLD.SelectedValue);
var rs = new Category();
rs.FLD = Num;
The last "Num" caused the error.
If I asign the Num = 2 directly, or change the field FLD to int, then everything will be OK.
The possible value for Num is less than 10. So I try to set FLD as tinyint. As I have a lot of similar fields.
Please help, thx.
...

Go to the complete details ...