Previous Topic Next topic Print topic


DETECTDATE

Enables recognition of date, time and datetime values in character host variables.

Syntax:

[NO]DETECTDATE

Properties:

Default: NODETECTDATE

Scope:

Used at compile time: Yes
Behavior at run time: Process

See Scope - OpenESQL SQL Compiler Directive Options and Scope - HCOSS SQL Compiler Directive Options for more information.

Comments:

The following comments apply to DETECTDATE as a generic SQL compiler directive:
  • Use DETECTDATE if your server does not have a suitable native character string date representation (for example, Microsoft Access). It is also useful for generic applications.
  • DETECTDATE identifies the following escape sequences:
    • {dData} - date
    • {tData} - time
    • {tsData} - timestamp
  • Once identified, DETECTDATE binds the host variables as date, time, and timestamp columns as appropriate instead of binding them as character columns.
  • The use of DETECTDATE can cause problems if your database contains character columns not related to date or time data that can legitimately contain data that starts with {d, {t or {ts.
Previous Topic Next topic Print topic