Subject | Re: [firebird-support] Avoiding Null value and having basic default values |
---|---|
Author | Martijn Tonies |
Post date | 2004-06-15T11:02:12Z |
Hi,
1) do you want a NULL? If so, display it as NULL/empty instead of 0.0
2) you can easily change the behaviour in a BEFORE INSERT or UPDATE
trigger:
if (new.mycolumn is null) then new.mycolumn = 0;
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> I am using FireBird as a backend for VFP using remote views. When I savea
> record in my applications fields that are not modified get saved as NullWell, there are two things to take care of:
> this creates problems at the time of reporting. Also say for eg. Double
> Precision numbers show a 0.00 on the app. form but actually the users is
> assuming that a zero is saved, but a Null is.
>
> Please advise as to what I can do to avoid this behaviour?
1) do you want a NULL? If so, display it as NULL/empty instead of 0.0
2) you can easily change the behaviour in a BEFORE INSERT or UPDATE
trigger:
if (new.mycolumn is null) then new.mycolumn = 0;
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com