How can I find the true database field type?
db type | visible type in grid
long -> memo
long raw -> blob
nclob -> hugeclob
raw -> varbytes
How can I find the true database field type
Re: How can I find the true database field type
Hello
What does it mean "true database field type"? Can you explain this term more detailed?
To get field classes in the run-time you can use the following code:
What does it mean "true database field type"? Can you explain this term more detailed?
To get field classes in the run-time you can use the following code:
Code: Select all
var
i: integer;
begin
OraQuery1.Open;
for i := 0 to OraQuery1.FieldCount - 1 do
ShowMessage('FieldName = ' + OraQuery1.Fields[i].FieldName + #13 +
'FieldClass = ' + OraQuery1.Fields[i].ClassName);
end;Re: How can I find the true database field type
Code: Select all
create table TEMP1
(
a LONG RAW,
b BLOB,
c CLOB,
d NCLOB
);
/
select * from TEMP1
how I can find in OraQuery what "A" it is LONG RAW in db and "B" it is BLOB in db and how to distinguish "c" and "d" datatypes in ODAC (CLOB and NCLOB)?
Re: How can I find the true database field type
To get real DB field types you can use the TOraMetaData component:
Code: Select all
begin
OraMetaData1.MetaDataKind := 'Columns';
OraMetaData1.Restrictions.Clear;
OraMetaData1.Restrictions.Add('TABLE_NAME=TEMP1');
OraMetaData1.Open;
end;