>>>>Hi,
>>>>
>>>>Say I have a form with textboxes bound to a cursor (retrieved from a SQL Server via SPT) and some values in the cursor are NULL. I prefer that the customer does not see the NULL but instead an empty textbox. How do you hide the NULL from these textboxes?
>>>>
>>>>Also, I prefer not to change the value in the cursor from the NULL to empty string for 2 reasons: 1 time that this procedure will take 2 - on Save I would have to convert the value back to NULL.
>>>>
>>>>TIA.
>>>
>>>Check:
>>>SET NULLDISPLAY TO command
>>>and
>>>Object.NullDisplay property in HELP.
>>>
>>>BTW If the NULL values are NOT needed at all I prefer to set default value to empty field (depends of its type). Only type that allow NULLs is datetime :-)
>>>Of course this is dependong the application, sometimes NULLs are mandatory.
>>
>>Thank you for the NULLdisplay suggestion.
>>
>>As far as setting default to empty value, I thought about it. The only issue is then if the column/field is a foreign key the primary key (to which RI constraint is set) has to have a row with an empty value. And this would be (IMHO) some maintenance headache.
>
>
>IMHO the headache will be to manage a parent - child tables where in child table you have records which are not presented in parent one, but again - that depends of the application.
You are correct; this is what I thought that I would have to have an empty row in the parent table and hide it from user.
But now I set the NULLDISPLAY to '' (just two quotation marks) and they are visible in the textbox. I was hoping that I can make this to be completely empty. Unless I am doing something wrong when setting the NULLDISPLAY value.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham