Subject Re: [IBO] IB_Date question
Author Geoff Worboys
> Yes Geoff, i don't need time info if this case, but it
> didn't work with date field as i said before :
> (exemple that i get: Exception ISC:335544334
> Conversion error from string "12:20:10.0000")
> When i replace the date field with a timestamp then it works.
> Now i have time info in the database, but ... i have no
> exception errors :-)

Pascal,

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

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

In IBA_Column.IMP find...


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


and change this to...


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


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

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


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


Geoff Worboys
Telesis Computing