0

I have the code

if (!(row.IsNull("bigInt") || row["bigInt"].Equals(String.Empty)))
            {
                this.bigInt = Convert.ToInt64(row["bigInt"]);
            }

But, it's give to me the error: Cannot inplicity convert type 'long' to 'int'. An explicit conversion exists (are you missing a cast?)

2
Contributors
1
Reply
12
Views
3 Years
Discussion Span
Last Post by gusano79
0

SQL Server's bigint type maps to Int64 in .NET, so that's right. It looks like you're trying to assign the result of the conversion where it won't fit. What type is this.bigInt?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.