Oracle 11 and Number(x) fieldtype
Posted: Wed 24 Mar 2010 10:33
Hi, we have a very strange behaviour of the TOraQuery with Oracle 11:
Odac version: Professional V 6.90.0.52 for Delphi 6
To reproduce the problem:
- Create 2 test tables with this script:
CREATE TABLE TEST1
(
ID NUMBER(10,0),
FLDNUM1 NUMBER(1) DEFAULT 0 NOT NULL
);
COMMIT;
CREATE TABLE TEST2
(
ID NUMBER(10,0)
);
COMMIT;
ALTER TABLE TEST2 ADD FLDNUM1 NUMBER(1) DEFAULT 0 NOT NULL;
COMMIT;
As you can see, we will end up with 2 identical tables, but the field [FLDNUM1] in Test1 is created directly with the table and in Test2 is added to the table afterwards.
Add a TSession and 2 TOraQuery to a project. In the first query add the select statement SELECT FLDNUM1 FROM TEST1 and SELECT FLDNUM1 FROM TEST2 in the second one.
In the 2 queries, open the fields editor and click 'Add all fields'. The field FLDNUM1 will be created.
The problem: in the query working on Test1, the field type is TIntegerField (correct for a number with a precision < 10).
In the query working on Test2, the field type is TFloatField (incorrect).
I can't figure out what the cause of this is (maybe the way used by the component to retrieve the precision / scale of the field)
This behaviour come only with Oracle 11.
Thanks for any help
Best regards
Odac version: Professional V 6.90.0.52 for Delphi 6
To reproduce the problem:
- Create 2 test tables with this script:
CREATE TABLE TEST1
(
ID NUMBER(10,0),
FLDNUM1 NUMBER(1) DEFAULT 0 NOT NULL
);
COMMIT;
CREATE TABLE TEST2
(
ID NUMBER(10,0)
);
COMMIT;
ALTER TABLE TEST2 ADD FLDNUM1 NUMBER(1) DEFAULT 0 NOT NULL;
COMMIT;
As you can see, we will end up with 2 identical tables, but the field [FLDNUM1] in Test1 is created directly with the table and in Test2 is added to the table afterwards.
Add a TSession and 2 TOraQuery to a project. In the first query add the select statement SELECT FLDNUM1 FROM TEST1 and SELECT FLDNUM1 FROM TEST2 in the second one.
In the 2 queries, open the fields editor and click 'Add all fields'. The field FLDNUM1 will be created.
The problem: in the query working on Test1, the field type is TIntegerField (correct for a number with a precision < 10).
In the query working on Test2, the field type is TFloatField (incorrect).
I can't figure out what the cause of this is (maybe the way used by the component to retrieve the precision / scale of the field)
This behaviour come only with Oracle 11.
Thanks for any help
Best regards