当格式为>,>>>,>> 9.99正在进行4gl时,为什么字段值为1'000,24而不是1,000.24?

时间:2014-08-04 11:21:24

标签: openedge

  

我们最近从9.1d升级到oe rdbms 11.3版本。在生成中   报告,我发现一个字段的字段值为2而不是   2,239.00。我检查了格式为&gt ;,>>>,>> 9.99。   这背后可能是什么原因?

2 个答案:

答案 0 :(得分:0)

安装数据库的管理员没有完成它的作业,并选择了错误的默认数字和小数分隔符。

但是没有造成更大的伤害:

设置这些启动参数

-numsep 44 -numdec 46

这是一个简化的数据库启动示例,其中添加了如上所示的参数:

proserve /db/db -H dbserver -S dbservice -numsep 44 -numdec 46

答案 1 :(得分:0)

安装Progress时,系统会提示您输入要使用的数字格式。然后将该信息写入名为“startup.pf”的文件,该文件位于安装目录中(Windows上默认为C:\ Progress \ OpenEdge ...)

如果选择了错误的数字格式,可以使用任何文本编辑器编辑startup.pf。看起来应该是这样的:

#This is a placeholder startup.pf
#You may put any global startup parameters you desire
#in this file.  They will be used by ALL Progress modules
#including the client, server, utilities, etc.
#
#The file dlc/prolang/locale.pf provides examples of
#settings for the different options that vary internationally.
#
#The directories under dlc/prolang contain examples of
#startup.pf settings appropriate to each region.
#For example, the file dlc/prolang/ger/german.pf shows
#settings that might be used in Germany.
#The file dlc/prolang/ger/geraus.pf gives example settings
#for German-speaking Austrians.
#
#Copy the file that seems appropriate for your region or language
#over this startup.pf. Edit the file to meet your needs.
#
# e.g. UNIX:            cp /dlc/prolang/ger/geraus.pf /dlc/startup.pf
# e.g. DOS, WINDOWS:  copy \dlc\prolang\ger\geraus.pf \dlc\startup.pf
#
# You may want to include these same settings in /dlc/ade.pf.
#
#If the directory for your region or language does not exist in
#dlc/prolang, please check that you have ordered AND installed the
#International component. The International component provides
#these directories and files.
#

-cpinternal ISO8859-1
-cpstream ISO8859-1
-cpcoll Basic
-cpcase Basic
-d mdy
-numsep 44
-numdec 46

对startup.pf文件的更改为 GLOBAL - 它们会影响在此计算机上启动的所有会话。如果您只想更改单个会话,则可以将参数添加到命令行(或快捷方式图标属性)或本地.pf文件或该会话使用的ini文件。

您还可以使用SESSION系统句柄以编程方式覆盖代码中的格式:

assign
  session:numeric-decimal-point = "."
  session:numeric-separator     = ","
.

display 123456.999.

(如果这是临时更改,您可能需要考虑保存当前值并恢复它们。)

(对于两种最常见的情况,你也可以使用速记会话:numeric-format =“american”。或“european”。)