Subject Re: [IBO] Grid Sorting -- Follow up
Author Geoff Worboys
>>> Blank? or null?

> I always put a string value in, but the string could have zero
> length. I don't honestly know if that results in a blank or null in
> IB.

The difficulty being that blanks will sort to the top, nulls will sort
to the end - and both look the same at the client.

What I generally do is...

Unless a field specifically needs to support null, I setup
insert/update triggers on the table that detect null and assign blank.


This helps me avoid all sorts of problems, such as complications while
concatenating strings etc. By doing it in the triggers in this way I
avoid having nulls creep in in unexpected situations (such as
explicit assignment of null, or different client app used to access
the database.)

I do similar things with number fields - but usually not date fields
as NULL actually has some use in that situation.

Of course you dont do this to foreign key fields - as null has
significance. There can be other instances where you dont wont this
sort of processing but that depends on the app.


Geoff Worboys
Telesis Computing