Re: Q: Suppressing NULLs using Forms 4.5

From: Andrew Tompkins <andrewto_at_kingfish.cse.tek.com>
Date: 1997/06/03
Message-ID: <ANDREWTO.97Jun3085138_at_kingfish.cse.tek.com>#1/1


In article <EB60zo.Fsp_at_jcc.com>
  tom_at_jcc.com (Thomas H. Musson) writes:

>
> I'm new to the group as well as to Forms and D2K.
>
> We are using D2K with Forms 4.5 against an Oracle Rdb (Oracle's other database)
> via Native Connect (an OCI interface to Rdb).
>
> I have a character column for which a space is a valid value, but I can't seem
> to make D2K allow me to enter a space into the database. I keep getting NULL
> instead. Is there any way that anyone knows to make D2K allow me to enter a
> space instead of a NULL into the database?
>

This is something that comes from Forms, not the database server. Forms strips leading spaces from CHAR typed form items (leaving NULL when there are only spaces in the item). The only way I have found to get around this is to insert (or update) the record for the items that have values using an explicit INSERT (or UPDATE) statement in an ON-INSERT (or ON_UPDATE) trigger for the block and then do explicit UPDATE statements for each item containing values that would be inserted as NULL, in the same trigger, which will insert the space that you want.

--Andy
-- 
-------------------------------------------------------
| Andrew G. Tompkins    | #include <disclaimer.std.h> |
| Software Design Eng.  ------------------------------|
| Tektronix, Inc.                                     |
| Phone: (503) 627-5172      fax: (503) 627-5548      |
| email: Andrew.Tompkins_at_tek.com (work)               |
|        andytom_at_teleport.com (home)                  |
| http://www.teleport.com/~andytom/                   |
-------------------------------------------------------
Received on Tue Jun 03 1997 - 00:00:00 CEST

Original text of this message