Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Null Values
Thu, Mar 18 2010 12:26 AMPermanent Link

Neil Huhta

Hello All:

  I am converting an app from DBISAM Version 1.

   In version 1 I could do a filter such as NUD<>'U' and get all records
where the NUD field did not contain capital U even if the NUD field is null.
Will this change under the new elevateDB ??? How did other users handle this
change in behavior ???


Neil
Profit Monster Data Systems

Thu, Mar 18 2010 3:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

huhtaman


You have two options

1. Create the columns with a default of emptyspace so there is ALWAYS something there
2. Add AND IS NOT NULL to the filter

If you use option 1 then never call field.Clear in Delphi always use field.AsString := '' .

Roy Lambert
Thu, Mar 18 2010 1:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< If you use option 1 then never call field.Clear in Delphi always use
field.AsString := '' . >>

Actually, if you just set the column so that it is required (NOT NULL) by
altering the table, then you don't have to worry about that, at least not in
terms of a NULL value getting into the table.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Mar 19 2010 9:45 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

><< If you use option 1 then never call field.Clear in Delphi always use
>field.AsString := '' . >>
>
>Actually, if you just set the column so that it is required (NOT NULL) by
>altering the table, then you don't have to worry about that, at least not in
>terms of a NULL value getting into the table.

Interesting thought. What's ElevateDB going to do silently convert it to empty string or throw a wobbly. If the latter I believe my comment stands. If the former very interesting.

Roy Lambert [Team Elevate]
Fri, Mar 19 2010 7:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Interesting thought. What's ElevateDB going to do silently convert it to
empty string or throw a wobbly. If the latter I believe my comment stands.
If the former very interesting. >>

Of course it's going to throw an exception.  My point was that just saying
"don't do this" isn't quite enough to make sure that your database integrity
stays intact. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Mar 20 2010 5:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>Of course it's going to throw an exception. My point was that just saying
>"don't do this" isn't quite enough to make sure that your database integrity
>stays intact. Smiley

and I never mentioned database integrity <vbg>

Roy Lambert
Image