Page 1 of 1
Possible to identify a raw field when using RawAsString?
Posted: Fri 20 Apr 2007 18:19
by MarkF
Hi Folks!
If I'm using the RawAsString option, is it possible to tell that a field's original datatype was raw? It's not a big deal, but I was wondering if I was just missing a way to do it.
Thanks!
-Mark Ford
Posted: Mon 23 Apr 2007 09:13
by Plash
ODAC does not support getting original data type for the RAW fields when the RawAsString option is True.
Re: Possible to identify a raw field when using RawAsString?
Posted: Thu 28 Jul 2016 15:38
by sinys
Hello!
I really need to know original data type too.
Could you please add new feature to keep original data type for field?
Re: Possible to identify a raw field when using RawAsString?
Posted: Mon 01 Aug 2016 08:40
by AlexP
Hello,
You can't get the original field type in the dataset, since Delphi types are used in DataSet. I.e., if the RawAsString option is enabled, then the field type will be TStringField, if disabled - TVarBytes. If you want to learn the Oracle field type, then you can use the TOraMetaData component:
https://www.devart.com/odac/docs/?devar ... tadata.htm
Re: Possible to identify a raw field when using RawAsString?
Posted: Tue 02 Aug 2016 12:25
by sinys
#if the RawAsString option is enabled, then the field type will be TStringField, if disabled - TVarBytes.
I have source licence and I saw this code.
OraClasses.pas
Code: Select all
procedure TOCICommand.DetectDataType(DBType: Word; ...
begin
case DBType of
...
oraRaw:
if FFieldsAsString or FRawAsString then
if FConnection.FUseUnicode then
DataType := dtWideString
else
DataType := dtString
else
DataType := dtVarBytes;
Just I want to have access to DBType parameter for can get oraRaw (original data type). May be you don't keep it now, I don't know. I wish you save DBType that I have access to this metadata without additional query (from TOraMetaData).
Re: Possible to identify a raw field when using RawAsString?
Posted: Mon 12 Sep 2016 08:47
by AlexP
The TField standard class has only the DataType property, and no additional properties describing internal types. Therefore, at the user level, you should use TOraMetaData to get required data.