Subject | Re: Problem in TIB_Query and currency... |
---|---|
Author | jocelyndionne@uraeus.qc.ca |
Post date | 2001-02-06T19:00:33Z |
Hello Jason.
If I use TIBOQuery, I don't have this problem, small numbers or big
ones. So, I think it's not the problem. Maybe I don't understand
what you mean.
Do you think about some actions that I can take to solve the problem?
From now on, I don't specify any field 'currency', and I use the
OnGetDisplayText event to format the numbers. But, I find it very
annoying.
Jocelyn Dionne.
If I use TIBOQuery, I don't have this problem, small numbers or big
ones. So, I think it's not the problem. Maybe I don't understand
what you mean.
Do you think about some actions that I can take to solve the problem?
From now on, I don't specify any field 'currency', and I use the
OnGetDisplayText event to format the numbers. But, I find it very
annoying.
Jocelyn Dionne.
--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> I believe with flagging a column as currency it will use the curr
datatype
> which uses 4 decimal places. This might be limiting the upper range
of
> dollars that the column can extend to.
>
> Just a thought.
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: <jocelyndionne@u...>
> To: <IBObjects@y...>
> Sent: Tuesday, February 06, 2001 8:28 AM
> Subject: [IBO] Re: Problem in TIB_Query and currency...
>
>
> > Hello Jason.
> >
> > It's very simple to recreate the problem.
> > It's obvious that you know how to do what I will explain here,
but I
> > do it just to be sure that you are aware of the exact steps that I
> > did to get the problem.
> >
> >
> > In Interbase:
> >
> > 1) create a table (table1) with three fields:
> > a) field1 integer
> > b) field2 varchar(50)
> > c) field3 double precision
> > 2) insert some rows in the table
> > 3) enter big number like 25,123,987.34 in field3
> >
> >
> > In Delphi:
> > 1) put a tib_connection,tib_query and a tib_datasource on a form
> > 2) I assume that you define the connection
> > 3) double-click on the tib_query component to bring the editor
> > 4) select * from table1 for update
> > 5) prepare it
> > 6) in column attributes tab, select field3 and click on currency
> > check box
> > 7) put a grid on the form, attach it to the datasource that you
> > defined
> > 8) run the program
> >
> > The form shows on my screen with the grid and in field3, I see,
for
> > example, 2512.3987. If I go back to the column attributes and
> > deselect the currency checkbox, I see 25123987.34 which is the
exact
> > number that I entered in field3.
> >
> >
> > I have to tell you that I put some breakpoints in your code (in
> > IBA_Column.imp) in the TIB_Column.GetDisplayText function and I
saw
> > that IsCurrency is never true.
> >
> >
> > I also tried with a numeric field and the behaviour is not exactly
> > the same. If I create a field3 numeric, the result in the grid is
> > rounded. I have to specify a large numeric field if I want it to
> > show correctly. But with large numbers, the problem reappears.
> >
> >
> > I hope this will help. I know you asked me for a little
application,
> > but, it is very simple to recreate the problem.
> >
> >
> > Jocelyn Dionne.
> >
> >
> >
> >
> > --- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> > > Is it possible that you could put this in a simplified
application
> > for me to
> > > look at?
> > >
> > > Thanks,
> > > Jason Wharton
> > > CPS - Mesa AZ
> > > http://www.ibobjects.com
> > >
> > >
> > > ----- Original Message -----
> > > From: <jocelyndionne@u...>
> > > To: <IBObjects@y...>
> > > Sent: Monday, February 05, 2001 12:27 PM
> > > Subject: [IBO] Re: Problem in TIB_Query and currency...
> > >
> > >
> > > > Am I the only one who's having this problem???
> > > >
> > > > Nobody has an idea???
> > > >
> > > >
> > > > Thanks.
> > > >
> > > > Jocelyn Dionne
> > > >
> > > >
> > > >
> > > > --- In IBObjects@y..., jocelyndionne@u... wrote:
> > > > > There is something strange that happens when I specify that
a
> > field
> > > > > is 'Currency' in TIB_Query.
> > > > >
> > > > > The field is defined 'Double precision' in the table.
> > > > >
> > > > > For example, if the field contains 25000000.000, it appears
only
> > > > > 2500.0000 in the grid and I don't see the dollar sign.
> > > > >
> > > > > If I don't specify 'Currency' and I enter a display format,
> > it's OK.
> > > > >
> > > > > My regional settings are well defined.
> > > > > I have some applications that use ADO and currency fields
> > appear OK.
> > > > >
> > > > > Do you have any idea of what's happening?
> > > > >
> > > > > Specs:
> > > > > Delphi 5 with the update pack
> > > > > IB6
> > > > > IBO 3.6cd
> > > > >
> > > > >
> > > > > Thanks in advance.
> > > > >
> > > > > Jocelyn Dionne
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
> >