Setting date fields to nullable

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sun Aug 23 13:01:29 CDT 2009


On 8/23/09 7:57 PM, "Steve Albin" <steve at steve-albin.com> wrote:

Hi Steve,

Lets clarify.

Let you have Table with 100 records.

Now you make some field FLD to be Nullable.
You do this and ...

MY expectation is tat all 100 records contain NOT NULL values.
For any type of field (may be except BLOB)

ZERO (0) value is not NULL, so its wrong expectation that ZEROs should
become NULLs.


> I have a data field that is not set to nullable.  I am writing a
> conversion for this database to change the schema so the field
> will be nullable using the following code:
> 
> 
>    newDateFld = VDate(BaseObject.Field("dIssueDate"))
>    newDateFld.IsNullable = True
> 
> After doing this, the schema is set correctly, but several of
> the legitimate dates are set to null also.  I would expect the
> dates stored as 00/00/0000 to be set to null but not legitimate
> dates such as 1/1/1990.
> 
> Is it legal to set a field to nullable this way after it has
> already been loaded with data?
> 
> Should I unload the field to a file and reload it before and
> after changing the schema?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list