Re: keeping blanks out of the data
Posted in 1992
>From: uunet!riverauswest.com!yslas ( Rob Yslas) >Subject: keeping blanks out of the data >Date: 5 Oct 92 20:28:59 GMT >X-Informix-List-Id: <news.1917> > >This is probably a dumb question but I don't have an sql/preform manual >for this information. I am using the standard engine and would like to >know if there is a way for me to keep the blanks at the end of a form from >being saved (attribute). The user likes to space bar for deletion of >mistakes rather then using ^d. I would also like to know if there is an >easy way to remove existing blanks from the end of fields in the database >or set fields with only blanks to a null. Any help is appreciated. Since SE always stores trailing blanks anyway, there is no point in worrying about what your user does. The actual record is fixed length, and the trailing blanks are added as required. Further, unless my memory serves me wrong, any all blank field is stored as null, unless you are using something weird like ISQL 1.00 or a form with the WITHOUT NULL INPUT directive. OnLine has VARCHARS, of course, where trailing blanks are automatically stripped and only as much storage as necessary is used. Note that trailing blanks cannot be reliably retained under either SE or OnLine in a CHAR or VARCHAR variable. SE does use index compression and will therefore drop trailing blanks off index keys -- OnLIne does not do this. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>