The conversion of the varchar value '6786463168' overflowed an int column

The conversion of the varchar value '6786463168' overflowed an int column

aboalwiaboalwi Posts: 6Questions: 2Answers: 0
edited October 2015 in Free community support

getting this when creating a new string field that is a bit too big AND using .Validator(Validation.Unique()) in my controller\
if i remove unique validator error disappears. annnnnnnnd... I need it :/

here are some images:
https://i.imgur.com/31VUmjL.png
https://i.imgur.com/sbiqZ1S.png

error appears after pressing create button.

[Edit]
Using .Net SQL Server

Answers

  • allanallan Posts: 62,312Questions: 1Answers: 10,225 Site admin

    Hi,

    This is going to be partly related to your other question about leading zeros I think, since my suggestion there will probably resolve the issue.

    However, if you don't use a string for the field, then you might want to try using a ulong (unsigned 64 bit number).

    Allan

This discussion has been closed.