Subject Re[2]: [IBO] IB_Date question
Author Pascal Amesland
Hello Geoff,

Tuesday, May 01, 2001, 3:10:42 AM, you wrote:

GW> Pascal,

GW> I imagine that you will prefer to go back to DATE data type if you do
GW> not want time information - since the time information only makes life
GW> more difficult when doing searches etc.

GW> I may have spied parts of the problem. If you have full source, would
GW> you mind experimenting for me so that we can verify the full cause of
GW> the problem?

GW> In IBA_Column.IMP find...


GW> procedure TIB_Column.SysLayoutChanged
GW> var
GW> tmpBool: boolean;
GW> begin
GW> FDateOnlyFmt := GetAttributeParamsEx( IB_NOTIME, tmpBool );


GW> and change this to...


GW> procedure TIB_Column.SysLayoutChanged
GW> var
GW> tmpBool: boolean;
GW> begin
GW> if ( SQLType = SQL_TYPE_DATE ) or
GW> ( SQLType = SQL_TYPE_DATE_ ) then
GW> tmpBool := true
GW> else
GW> FDateOnlyFmt := GetAttributeParamsEx( IB_NOTIME, tmpBool );


GW> This should allow you to return your column back to DATE, and get the
GW> datepick appear in IB_Grid even without specifying 'NOTIME' in the
GW> column attributes.

GW> IMPORTANT: Please ensure that you have an entry in one of the Fields*
GW> properties of the query (eg. FieldsAlignment: 'MyField=Left' ). The
GW> entry can be for any column, there just needs to be something. At the
GW> moment it appears this is necessary for the SysLayoutChanged function
GW> to be called (I will talk to Jason about this).


GW> What I am less certain about is whether this will solve the exception
GW> you are seeing because of the time information. I did not see this
GW> problem in my experimentation. We need to discover how a string
GW> containing time information is making it into your query - can you
GW> tell me what the global ShortDateFormat variable is on your system
GW> (putting a breakpoint in the above function will let you discover this
GW> when the query is prepared). Also, perhaps you can run IB_Monitor and
GW> post the result of what happens when this exception appears.


GW> Geoff Worboys
GW> Telesis Computing

Ok, i made the mofications in the source file you told me.
i modified my domain database dom_date from timestamp to date
After a complete rebuild of ibobjects and my app, it works again, with
TIB_Date control (without exeptions at all).

For info : On my PC, the short date format is DD/MM/YYYY
example : 01/05/2001.

Many thanks, i can go on now.

--
Best regards,
Pascal mailto:p.amesland@...