0

I am writing a vb.net project with mysql and while coding I face some error and could not find the solution the error I have set my phone number datatype size to 20 but in vb. Net I can enter 10 digits nunber when i tried to enter this error shoes I have attached the image enter image description here

Shen
  • 15
  • 2
  • 1
    Welcome to Stack Overflow! Please take the [tour](https://stackoverflow.com/tour) and read through the [help center](http://stackoverflow.com/help), in particular [how to ask](https://stackoverflow.com/help/how-to-ask). Your best bet here is to do your research, search for related topics on SO, and give it a go. After doing more research and searching, post a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) of your attempt and say specifically where you're stuck, which can help you get better answers. – help-info.de Aug 29 '20 at 17:58
  • 1
    Please read why not upload images of code and/or errors on SO when asking a question [Discourage screenshots of code and/or errors](https://meta.stackoverflow.com/questions/303812/discourage-screenshots-of-code-and-or-errors). – help-info.de Aug 29 '20 at 17:59

1 Answers1

0

My bet is you've declared the column as INT(20) thinking that means it's an int that can store 20 digits; it doesn't

And then youre trying to put a number like 4,123,456,789 (10 digits) into it not realizing that the max value of an integer is 2.1 ish billion

Use a string to store your number, and also read http://bobby-tables.com; never again should you write an SQL like you have there. It's dangerous and I know employers that have fired developers for less

Caius Jard
  • 72,509
  • 5
  • 49
  • 80
  • Thank you so much you really help my problem i used sting as you say now my error is fixed thank you so much again – Shen Aug 30 '20 at 04:09
  • @Shen the best way to thank someone on Stack Overflow is to accept their answer by clicking the check mark (tick mark) to the left of the answer. – Mary Aug 30 '20 at 05:40