Reputation: 1623
I'm using SQL Server 2012 and I'm trying to insert values in an int
column (Filenum
)
INSERT INTO Tbl (Filenum, Fname, Sname, Tname, Lname, DOB, NatID, SexID, AdrsCtryID, AdrsStateID, AdrLin1, FileStatID, MarStatID, OcupID, Email, SSnum, Passnum, TelMob, TelLnd, TelWrk, TelWrkExt, TelInt, strno, Direction, AptNo, locality, adminLvl, postalcode, Contr, UsrID, LogID)
VALUES (@FileNum, @Fname, @Sname, @Tname, @Lname, @DOB, @NatID, @SexID, @AdrsCtryID, @AdrsStateID, @AdrLin1, @FileStatID, @MarStatID, @OcupID, @email, @SSnum, @Passnum, @TelMob, @TelLnd, @TelWrk, @TelWrkExt, @TelInt, @strno, @Direction, @AptNo, @locality, @adminLvl, @postalcode, @Contr, @UsrID, @LogID)
Values like (777777777) with 9 digits are allowed whereas 10 digit values give me this error
The changed value in this cell was not recognized as valid .net framework data type int32
Any idea why?
Upvotes: 1
Views: 60
Reputation: 38023
max size for 4 byte signed integer: 2147483648
Try using a bigint
in sql server, and a 64bit signed int long
in .net.
Reference:
Upvotes: 3