Subject | RE: [IBO] TIB_Export |
---|---|
Author | Helen Borrie |
Post date | 2006-01-11T03:08:03Z |
At 07:11 PM 10/01/2006 -0700, you wrote:
the fact that you can't export scaled numbers to dBase. It recognises
integers only. When you define a NUMERIC type in dBase you have to supply
a PICTURE clause to define the position of the decimal point.
You'd have to export your scaled numbers to strings, as that is the format
that dBase expects for numerics (with an empty string for null). It's very
klutzy, since you have to know the PICTURE clause that was stored with the
field definition to know exactly what kind of a numeric the dBase engine
will resolve the string to.
The more recommended thing to do is to store a scaled number as two integer
fields: an integer for the data (precision 18, 64-bit integer is said to
be valid, though elsewhere I've read that 9 is the highest precision you
can safely store..) and use the second one to store the scale...that is,
use the same technique as Fb/IB 6+ use for storing scaled numbers.
So exporting Fb/IB data to dBase really needs to expose both methods and
limit the length of the string in the first method, or require a scale
column to be available for the second.
Helen
> > I´m using TIB_Export to transport data from Firebird 1.5 to DBF´s.No, I don't have a dBase database to export to; but the problem comes from
> >
> > Recently I have a problem in order to use field types Numeric(15,2).
> >
> > When the TIB_Export creates the table, data in these fielsd are
> > "rounded" like "5,45" -> "5". I use the DataBase Desktop from Delphi
> > to see the info structure from the generated table and the current
> > field Numeric(15,2) from Firebird is converted in numeric(7,0) in DBF
> > table.
> >
> > Someone help me in order to convert the field with decimal´s places
> > correctly.
>
>I'd appreciate it if a little sample application could be put together on
>this issue. Is there anyone who can give this a go?
the fact that you can't export scaled numbers to dBase. It recognises
integers only. When you define a NUMERIC type in dBase you have to supply
a PICTURE clause to define the position of the decimal point.
You'd have to export your scaled numbers to strings, as that is the format
that dBase expects for numerics (with an empty string for null). It's very
klutzy, since you have to know the PICTURE clause that was stored with the
field definition to know exactly what kind of a numeric the dBase engine
will resolve the string to.
The more recommended thing to do is to store a scaled number as two integer
fields: an integer for the data (precision 18, 64-bit integer is said to
be valid, though elsewhere I've read that 9 is the highest precision you
can safely store..) and use the second one to store the scale...that is,
use the same technique as Fb/IB 6+ use for storing scaled numbers.
So exporting Fb/IB data to dBase really needs to expose both methods and
limit the length of the string in the first method, or require a scale
column to be available for the second.
Helen
>Thanks,
>Jason
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>