Microsoft KB Archive/105326

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Embedded SQL version 4.21 for COBOL

BUG# 9445 (4.21)

SYMPTOMS
In Embedded SQL (ESQL) for COBOL, a static INSERT statement does not insert NULLs into a datetime column, even if the NULL indicator is set. When inserting into a datetime column, the NULL indicator is simply ignored, and the following default datetime value is inserted:

1/1/1900 12:00AM However, if the INSERT statement is dynamic, NULLs are inserted correctly using null indicators.

CAUSE
SQL Server Embedded SQL for COBOL incorrectly ignores null indicator when inserting NULLs into a datetime column if the insert is static.

WORKAROUND
Use dynamic SQL statements, or perform updates on the datetime column to change the default datetime values to NULLs using an insert trigger.

STATUS
Microsoft has confirmed this to be a problem in Embedded SQL version 4.21 for COBOL. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
 * }

-

Last reviewed: May 5, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.