Home > Back-end >  Delphi7 connection mariadb database decimal field problems
Delphi7 connection mariadb database decimal field problems

Time:11-03

Mariadb defined in a decimal (10, 2), logging data, 1.2 in Delphi use adoquery connection becomes 0.12, when this kind of situation in the dbgrid showed that is the case, the values, showmessage (formatfloat (' 0.00 ', yslxk fieldbyname (' ysdj). AsFloat)); If deposited in the data of 1.23, in Delphi show normal,
If the decimal (10, 2) to a double (10, 2) also have no questions,
If you must use a decimal (10, 2) what should I do?

CodePudding user response:

This problem has solved the problem of estimation is mariadb odbc, switch to mysql odbc, this problem can be solved.
  • Related