Kbase P105808: ODBC DataServer does not trim trailing spaces like Progress/400 DataServer
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/06/2005 |
|
Status: Verified
FACT(s) (Environment):
OpenEdge 10.x
SYMPTOM(s):
ODBC DataServer does not trim trailing spaces like Progress/400 DataServer
Unable to concatenate database character field data from AS/400 with literal to form a procedure name to run
Using Progress/400 DataServer can concatenate database character field data with literal to form a procedure name to run.
ODBC DataServer accessing files created via DDS
CAUSE:
The Progress/400 DataServer automatically trimmed trailing spaces. The ODBC DataServer does not. Using the following code produces two different values depending on which DataServer is used. prgfile.name is defined as format "x(10)" and the record found has the value of "foo".
DEFINE VARIABLE pname LIKE prgfile.name.
FIND FIRST prgfile.
ASSIGN pname = prgfile.name + ".w".
RUN VALUE(pname).
When using the Progress/400 DataServer pname = "foo.w". The procedure can be found and run.
When using the ODBC DataServer pname = "foo .w" The name contains 7 spaces between the last o and the .w. The procedure can not be found.
FIX:
This is expected behavior and illustrates one of the differences between the Progress/400 DataServer and ODBC DataServer. When using the ODBC DataServer with DDS defined files you need to use the TRIM function to eliminate the trailing spaces.