otChar and Describe

jestep

Member²
When doing a describe using 3.4.6 Delphi 6... A char field is always being returned as otString instead of otChar....

Any ideas??
 
That is indeed true. The TOracleQuery.FieldType function will report all varchar/varchar2/char/raw fields as otString.

If you want to know if this is a otChar, use FieldDBType instead.

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
That is indeed true. The TOracleQuery.FieldType function will report all varchar/varchar2/char/raw fields as otString.

If you want to know if this is a otChar, use FieldDBType instead.


Thanks Marco,

It is not in the documentation I have. Is there a new Version?. If not, when??

Still no columns that are char get returned as Char...... Now, they get returned as nothing. What is wrong here??

Function TfrmDescribe.ReturnFieldType(oType : Integer) : String;
Begin
Result := '';
Case oType of
otChar : Result := 'CHAR';
otInteger : Result := 'INTEGER';
otFloat : Result := 'NUMBER';
otNumber : Result := 'NUMBER';
otVarchar2 : Result := 'VARCHAR2';
otString : Result := 'VARCHAR2';
End;
 
It is indeed an undocumented feature. I notice that it returns an (also undocumented) otDBChar.

It seems you are on undocumented territory...

------------------
Marco Kalter
Allround Automations
 
In addition to the documented types you can get:

otDBChar
otVarchar2
otNumber
otVarchar
otRowId
otRaw

All are treated as otString fields, except otNumber, which is treated as otInteger or otFloat, depending on scale and precision.

------------------
Marco Kalter
Allround Automations
 
Back
Top