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
Possible to identify a raw field when using RawAsString?
Re: Possible to identify a raw field when using RawAsString?
Hello!
I really need to know original data type too.
Could you please add new feature to keep original data type for field?
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?
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
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?
#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
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).
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;
Re: Possible to identify a raw field when using RawAsString?
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.