Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Initial Programming Considerations : Data types : DataServer for MS SQL Server support for datetime data types : Using Datetime Data Types with Stored Procedures
 
Using Datetime Data Types with Stored Procedures
Beginning in OpenEdge Release 10.2B, DATETIME-TZ is included as a parameter type that can be passed to and received from stored procedures.
The DATETIME-TZ data types are definable in both static and dynamic temp tables. Therefore, along with parameterization, SENDSQL and stored procedure result sets can convert DATETIME-TZ data types when using LOAD-RESULT-INTO.
If query results derived from a stored procedure are defined by foreign data types that require special mapping in order to retain their value or a portion of their value, they should be CAST to a type that can handle them. For instance, a TIME data type in a stored procedure result set should be CAST to a datetime data type that can receive the time component since OpenEdge does not support a TIME data type directly. The CAST should be done as part of the result set before it is received into a SQL View or LOAD-RESULT-INTO temp tables. Similarly, an MS SQL Server datetime data type with time precision greater than OpenEdge should be CAST to a native datetime data type with the same or less precision than OpenEdge before it is returned in the result set so it can be properly received. Or, you could CAST a more precise value to a VARCHAR column in advance and preserve the precision in the alphanumeric form of an OpenEdge CHARACTER field.