Home > Back-end >  How to display 8-bit decimal point in turn dbgrideh field
How to display 8-bit decimal point in turn dbgrideh field

Time:09-29

BCD already set become false,
In the database field for numeric digits is 8

0.12321312341 but written into the database is always shown in dbgrideh four 0.1232

When the input will be automatically converted into four,

CodePudding user response:

http://bbs.csdn.net/topics/350153128

CodePudding user response:

reference 1st floor sololie response:
http://bbs.csdn.net/topics/350153128


Have tried or not

CodePudding user response:

DBGridEh encountered similar problems, to revise to the source code

CodePudding user response:

refer to the original poster mengxiao6106 response:
BCD has set a false,
In the database field for numeric digits is 8

0.12321312341 but written into the database is always shown in dbgrideh four 0.1232

When the input will be automatically converted into four,


Try the DEV CXGIRD controls!

CodePudding user response:

Eight key or testing data controls whether decimal places

DataSet. FieldByName (' field name) look AsString display.

I will test ADODataSet1 EnableBcd set false, regardless of the control that can be shown correctly 8 decimal places!

CodePudding user response:

First look at the data in the database, if no problem, if the impact is not big change the control, can't let this little problem card dead,

CodePudding user response:

Really not line, is set to the first string, transformation in another place

CodePudding user response:

Rewrite OnGetText field

CodePudding user response:

Dbgrid?
DisPlayFormat=0.00000000

CodePudding user response:

If still won't do, you see if you select out with database software is a few?
If is four, are you sure you want to change the data type,
To dec type

CodePudding user response:

reference 5 floor bihai reply:
key or testing data controls whether there are eight decimal

DataSet. FieldByName (' field name) look AsString display.

I will test ADODataSet1 EnableBcd set false, regardless of the control that can be shown correctly 8 decimal places!

Agree, I in Delphi 7 + MS SQL 2000, whether it be Numeric (18, 8) or a Decimal (18, 8) can be in ADODataSet1. EnableBCD to False, the DBGrid, DBEdit, DBGridEh can properly show eight Decimal places,

CodePudding user response:

The
references to the tenth floor haochin response:
if or not, you see if you select out with database software is a few?
If is four, are you sure you want to change the data type,
To dec type


The database is 8 bits,

CodePudding user response:

My is
Displayformat='0.0000 # # # # # # # #';
But the corresponding column is still in the second round,

CodePudding user response:

The most practical way is in the Field. The OnGetText event processing

The inside of the TEXT can be returned to the control the

But beware, if handled, may see and actual values have deviation

Access database can't build a DECIMAL field, only FLOAT fields, so the access database to OnSetText write accurate data into the database can
SQL SERVER does not exist the problem

CodePudding user response:

DisPlayFormat=0.00000000

CodePudding user response:

  • Related