User Tools

Site Tools


zerodate.htm
Navigation:  SQL Driver Strings(General) >====== ZERODATE ====== Previous pageReturn to chapter overviewNext page

DRIVER('SQLDriver', '/ZERODATE = NULL | TRUE | FALSE' )

[ Nulls“ = ] SEND(file, '/ZERODATE [ = NULL | TRUE | FALSE ]' )

blk2blue.jpg

(Not valid for the Oracle driver)

ZERODATE defines how the target driver should generate a WHERE clause for cleared DATE

and TIME fields and replaces the \ZEROISNULL driver string.

ZERODATE=NULL is equivalent to ZEROISNULL=TRUE and is the default behavior.

ZERODATE=0 (FALSE) is equivalent to ZEROISNULL=FALSE.

ZERODATE=1 (TRUE) indicates that a cleared date will be generated as 01/01/0001 and a cleared time is generated as 0.

If both ZERODATE and ZEROISNULL is specified in the driver string, the last one will be used.

If you use the driver string editor in the dictionary editor, it will automatically convert ZEROISNULL to the equivalent ZERODATE.

NoteBox.jpg

This driver string is meant for how the field is updated, rather than how it is retrieved (imported). When you do a SET(key,key) on a key with a date component that has been cleared, the driver needs to know how to generate the SELECT .. WHERE clause.

For example:

Setting ZERODATE=NULL generates:

SELECT * WHERE datefield > NULL

Setting ZERODATE=0 generates:

SELECT * WHERE datefield > 0

Setting ZERODATE=1 generates:

SELECT * WHERE datefield > 01/01/0001

This feature is not supported for Oracle drivers.

For MSSQL drivers (regardless of the driver string setting in the dictionary editor), updating a cleared Date will always be written as NULL.

zerodate.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1