There is a value in the oracle data table. * 0.036 is the value I want.
select mynum * 0.036 as num1 from mydb;
Running in PL / SQL is no problem, the results can be displayed, but in DELPHI through ADOQUERY, want to display in DBGRID will not work. It seems that DELPHI took mynum * 0.036 as a field. What should I write to show the results?
Check if your data set connection is correct, whether your datasource is set, and field! Whether the datagrid is connected to the corresponding DataSource
I want to use a static field or specify a data type in the DataSet. If mynum is an integer, mynum * 0.036 is an integer, and the data type has changed. Could it be the problem here?
How do I feel that you have n’t explained:
1. You want to enter a number, then multiply it by 0.036 to get one, and then display it. Use calculated fields.
2. You want to get a query directly, you can just query it directly, just set the precision!
Thank you all, the problem has been solved.
It should be a question of the type of field displayed.
Set the type of each field in the FIELDS EDITOR of ADOQUERY. Just make num1 a float type display.