Kbase P115870: BUFFER-COPY statement does not copy DateTime field when called from a .NET Open client
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/01/2007 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.x
SYMPTOM(s):
BUFFER-COPY statement does not copy DateTime field when called from a .NET Open client
Passing a TABLE-HANDLE as INPUT parameter
The Buffer from the Temp-Table, passed to the procedure, is copied to a database buffer
hBufferDB:buffer-field("DateTimeField"):BUFFER-VALUE returns "?"
Can also be reproduced when passing a TABLE-HANDLE as INPUT-OUTPUT parameter
It cannot be reproduced when the procedure is run from a 4GL client through the AppServer
CAUSE:
This is expected behavior. The BUFFER-COPY statement will only copy fields if the source and destination data-types match exactly.
The .NET DataTable is being passed as a dynamic table, and because no Progress column type was specified for the DateTime columns, they are passed to the AppServer as the default data type DATE.
Since the destination is a Progress DateTime data type, the BUFFER-COPY does not copy the field.
FIX:
To fix the mapping, in the .NET client code, set the Progress data type for the datetime columns from .NET by doing :
ProDataTable.SetColumnProType(<DataTable>, "<DateTime field name"", Parameter.PRO_DATETIME);
Then the BUFFER-COPY statement will copy the DateTime field.