skip to Main Content

Data I enter
Data that get SavedSevice Code

I tried to save without the decimals and display it with the decimal it did not work. Thinking of saving the same value in a new textbox and saving it while making the new text box without comma. I think the comma is the problem hear and the data type I have chosen is double.

2

Answers


  1. Yes, mysql will not recognize the comma as part of a number. If you have the STRICT_TRANS_TABLES sql_mode enabled (which is the default in newer versions), you will get an error when you insert or update to a numeric field with such a value. Without STRICT_TRANS_TABLES, you will only receive a warning, and the non-numeric portion will be discarded, leaving just 10.

    Login or Signup to reply.
  2. Did you code a GUI yourself? If yes, then you are sending wrong type to your backend. If your GUI written in javascript and you are entering numbers with comma dont send the value of input directly, instead send Number(value.replace("," , "")). And also check the field is not in type Long or Integer in Spring Boot. You should use Float or Double type in backend for floating numbers.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search