Subject RE: [IBO] IBO rev 2785 and default values
Author Marcin Bury
Hello Jason

Any progress on this subject?
I have noticed that you have prepared IBO for Delphi 10.3, so maybe the next thing will be this one?

Thanks and regards
Marcin

------ Wiadomość oryginalna ------
Od: "'Marcin Bury' marcin.bury@... [IBObjects]" <IBObjects@yahoogroups.com>
Data: 02.11.2018 18:02:36
Temat: Re[5]: [IBO] IBO rev 2785 and default values

Hi Jason

The direction seems to promising, but what was your intention choosing OnPost event?
I my opinion (I'd be glad to hear others) it would be better to apply default values OnInsert. It would allow user to decide if she/he wants to enter her/his own values of leave particular fields with default values.

Despite of this - please exclude parameters values from any affection of GetServerDefaults property. It should always behave like sdfNever ;-)

Marcin

------ Wiadomość oryginalna ------
Od: "'Jason Wharton' jason@... [IBObjects]" <IBObjects@yahoogroups.com>
Data: 02.11.2018 02:22:40
Temat: RE: Re[3]: [IBO] IBO rev 2785 and default values

Hi Marcin,
 
Yes, I've been thinking about this and I am actually taking a look at it right now.
 
What if I did this:

GetServerDefaults would be changed to GetServerDefaultsMode that would have three values.

sdfOnPost (the default)
sdfAlways
sdfNever
 
I will make the sdfOnPost setting have the following behavior:

Dataset goes into insert mode.  No defaults are acquired from the server, yet.  When the record is posted it will determine values that are still null and then plug in a value for them from the server default value, if available.
 
The other two modes are self-explanatory.
 
Therefore, for you, the legacy behavior you wanted will still be there and the desirable aspects will also still happen as well.
 
What do you think?
 
Jason Wharton
 



From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Wednesday, October 31, 2018 10:40 AM
To: IBObjects@yahoogroups.com
Subject: Re[3]: [IBO] IBO rev 2785 and default values

 

Hi Jason

Is it possible that we can get back to below discussion?
I'd like to know if you're going to modify the way IBO treats defaults
from the server?

Thx
Marcin

------ Wiadomość oryginalna ------
Od: "Marcin Bury" <marcin.bury@studio-delfi..pl>
Do: IBObjects@yahoogroups.com
Data: 07.08.2018 21:15:20
Temat: Re[2]: [IBO] IBO rev 2785 and default values

>Hello Jason
>
>First of all - thank you for prompt response.
>
>Getting default values from the server is generally good thing. There
>is nice feature 'Import server defaults' that fills 'DefaultValues'
>property.
>Then there is property GetServerDefaults - which is by deafault ( ) set
>to false.
>I would like to have control on application side if a query utilises
>server defaults or not. Isn't it the purpose of GetServerDefaults
>property?
>For currency fields I always use domain defined as NUMERIC(15,2)
>default 0. This default is actually to cover my lazy back in case of
>... In this particular example null value means something different
>than 0 value. Quite often I use following scenario: while adding new
>record such a field is intentionally left blank, if the user wants to
>put there some explicit value - he is more than welcome - 0 is one of
>possible explicit values. If while saving the record this field is
>still bank, some predefined calculations are performed and their result
>is written to this field.
>
>Then I would get back to my second case - what was your intention to
>get defaults for parameters?
>
>Jason, I always appreciate and admire your hard work, simply sometimes
>don't follow you intentions
>
>Best regards
>Marcin
>
>------ Wiadomość oryginalna ------
>Od: "'Jason Wharton' jason@... [IBObjects]"
><IBObjects@yahoogroups.com>
>Do: IBObjects@yahoogroups.com
>Data: 07.08.2018 20:37:09
>Temat: RE: [IBO] IBO rev 2785 and default values
>
>>
>>
>>Marcin,
>>
>>My intent was for these changes to be an improvement. IBO's core
>>philosophy is to have all of the aspects possible from the server be a
>>part of things on the client. I want server declared default values
>>to be utilized on the client. Perhaps you could explain to me why you
>>want a NULL default rather than the server declared default. I
>>probably just don't understand why this would cause a problem instead
>>of being appreciated.
>>
>>Thanks,
>>Jason Wharton
>>www.ibobjects.com
>>
>>
>>----------------------------------------------------------
>>From:IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
>>Sent: Tuesday, August 07, 2018 1:51 AM
>>To:IBObjects@yahoogroups.com
>>Subject: [IBO] IBO rev 2785 and default values
>>
>>
>>Hello Jason
>>
>>It seems that you modified the way IBO works with columns' default
>>values. And it also seems that you made a step too far .
>>If a column is based of domain with default value this default value
>>is
>>taken when adding new record (previously IBO was keeping null value),
>>but what is more annoying that IBO sets the default value for
>>parameters.
>>I have a stored procedure that has and integer parameter based on
>>domain
>>with 0 as default value. Procedure is prepared to accept null value in
>>this parameter and 'behave' accordingly. What was my surprise when IBO
>>set 0 for this parameter 'without asking'
>>
>>So, could you reconsider your changes?
>>
>>Thanks
>>Marcin
>>
>>
>>
>>
>>

[Non-text portions of this message have been removed]