Board index » delphi » Oracle INTEGER TTable problem

Oracle INTEGER TTable problem

Delphi 3 CS

I'm trying to use the TTable.Create Table to create oracle (and paradox
- switchable!!!) tables

With a ttable component:

Add an INTEGER field I.

Call createtable.

Oracle table has what I would consider correct field - I NUMBER(10).

Activate Table

Wrong type!!! For some reason Delphi reads back the NUMBER(10) as a
TFloatField rather than the TInterfield that it is.

Any ideas?

Thanks, Dave.

 

Re:Oracle INTEGER TTable problem


Set ENABLE INTEGERS=TRUE for your database connection.
Ian

Re:Oracle INTEGER TTable problem


Hello,

1) I have the same problem and I already tried to put ENABLE INTEGERS = TRUE
but without any succes. Could it be due to the definition of the field in
Oracle Table, defined as    NUMBER(* , 0) which  seems to be interpreted as
NUMBER(22, 0).

2) I also have problems when I put ENABLE BCD = True.
Fields defined in Oracle as NUMBER(15,2) are updated without decimal places
. For instance 1.3 is stored as 13 etc...
Any Idea ?

Ian Mar{*word*249}s a crit dans le message <7fkk8n$4d...@forums.borland.com>...

Quote
>Set ENABLE INTEGERS=TRUE for your database connection.
>Ian

Re:Oracle INTEGER TTable problem


I guess you'll have to live with the idea that VCL DB components are not as
switchable as claimed.
Try however CREATE TABLE in a TQuery.

Florin

Re:Oracle INTEGER TTable problem


Thanks Florin, but for me, the INTEGERS=TRUE option does initially appear to
work...
Doesn't help with field name cases of course... but I can get around that..

Dave

Quote
Florin Vancea wrote:
> I guess you'll have to live with the idea that VCL DB components are not as
> switchable as claimed.
> Try however CREATE TABLE in a TQuery.

> Florin

Re:Oracle INTEGER TTable problem


Quote
>1) I have the same problem and I already tried to put ENABLE INTEGERS =
TRUE
>but without any succes. Could it be due to the definition of the field in
>Oracle Table, defined as    NUMBER(* , 0) which  seems to be interpreted as
>NUMBER(22, 0).

Actually, it will be interpreted as NUMBER(38) (same happens with INTEGER).
If you want integers,
you'll have to create fields with the required precision.

Quote
>2) I also have problems when I put ENABLE BCD = True.
>Fields defined in Oracle as NUMBER(15,2) are updated without decimal places
>. For instance 1.3 is stored as 13 etc...
>Any Idea ?

Sorry, I haven't tested it yet with Oracle, but with InterBase I always use
ENABLE BCD=FALSE, to accelerate arithmetic operations.

Ian

Re:Oracle INTEGER TTable problem


In article <7fmgqf$6...@forums.borland.com>, ecresp...@hotmail.com
says...
Quote
> Hello,

> 1) I have the same problem and I already tried to put ENABLE INTEGERS = TRUE
> but without any succes. Could it be due to the definition of the field in
> Oracle Table, defined as    NUMBER(* , 0) which  seems to be interpreted as
> NUMBER(22, 0).

> 2) I also have problems when I put ENABLE BCD = True.
> Fields defined in Oracle as NUMBER(15,2) are updated without decimal places
> . For instance 1.3 is stored as 13 etc...
> Any Idea ?

> Ian Mar{*word*249}s a crit dans le message <7fkk8n$4d...@forums.borland.com>...
> >Set ENABLE INTEGERS=TRUE for your database connection.
> >Ian

ENABLE INTEGERS does not work if not enabled BOTH on the alias AND the
database driver setting. (with BDEADMIN)
other than that, it works fine.
BCD, I dont know, never used it.

--
mike cariotoglou
m...@REMOVETHIS.singular.gr

Re:Oracle INTEGER TTable problem


if you set enable integer = true then all fields <= NUMBER(10) will come
over as
integers.  NUMBER and > NUMBER(10) will come over as floats.  This is
because of the definition of MAXINT in Delphi.

Good luck,

John

Quote
David Pilcher wrote:
> Delphi 3 CS

> I'm trying to use the TTable.Create Table to create oracle (and paradox
> - switchable!!!) tables

> With a ttable component:

> Add an INTEGER field I.

> Call createtable.

> Oracle table has what I would consider correct field - I NUMBER(10).

> Activate Table

> Wrong type!!! For some reason Delphi reads back the NUMBER(10) as a
> TFloatField rather than the TInterfield that it is.

> Any ideas?

> Thanks, Dave.

Other Threads