TVirtualTable suggestions
TVirtualTable suggestions
I just took another look at TVirtualTable since Timestamps were added in the new version. It's a nice component, but it's missing many datatypes. Is there any thought to adding more or even all of the missing datatypes to it? In my quick testing it doesn't support ftNumber, ftOraTimeStampTZ, ftOraTimeStampLTZ, ftIntervalYM, and ftIntervalDS. I'm guessing there are more as well. Perhaps some of the other unsupported types could be converted to a string representation?
Thanks,
-Mark
Thanks,
-Mark
Re: TVirtualTable suggestions
Hello,
The ftNumber, ftOraTimeStampTZ, ftOraTimeStampLTZ, ftIntervalYM, ftIntervalDS types are not standard Delphi types. These types are implemented only in ODAC. Since VirtualTable is not bound to any product, and works only with the standard Delphi types, we are not able to add support for these types. If you have a version with source code, we may suggest the required changes for support of these types.
The ftNumber, ftOraTimeStampTZ, ftOraTimeStampLTZ, ftIntervalYM, ftIntervalDS types are not standard Delphi types. These types are implemented only in ODAC. Since VirtualTable is not bound to any product, and works only with the standard Delphi types, we are not able to add support for these types. If you have a version with source code, we may suggest the required changes for support of these types.
Re: TVirtualTable suggestions
Thanks for that, I hadn't realized that TVirtualTable wasn't specific to ODAC. I do have the source and would appreciate any pointers in how to support those types in TVirtualTable.
-Mark
-Mark
Re: TVirtualTable suggestions
To support these types, you should make the following corrections in the VirtualTable.pas module:
- add Ora module to the Uses section;
- change the InternalCreateFieldDefs method: you should replace the following code:
with the code below:
- add Ora module to the Uses section;
- change the InternalCreateFieldDefs method: you should replace the following code:
Code: Select all
case DataType of
ftOraBlob: NewDataType := ftBlob;
ftOraClob: NewDataType := ftMemo;
{$IFDEF VER9P}
ftOraTimeStamp: NewDataType := ftTimeStamp;
{$ENDIF}
Code: Select all
case Integer(DataType) of
Integer(ftOraBlob): NewDataType := ftBlob;
Integer(ftOraClob): NewDataType := ftMemo;
{$IFDEF VER9P}
Integer(ftOraTimeStamp): NewDataType := ftTimeStamp;
{$ENDIF}
Integer(ftNumber): NewDataType := ft...;
Integer(ftIntervalYM): NewDataType := ft...;
Integer(ftIntervalDS): NewDataType := ft...;
Integer(ftOraTimeStampTZ): NewDataType := ft...;
Integer(ftOraTimeStampLTZ): NewDataType := ft...;
Re: TVirtualTable suggestions
Could you give an example of how to support any one of those? Is the idea just to map to an existing type? How would that work for ftOraNumber or ftOraTimeStampTZ? Thanks.
Re: TVirtualTable suggestions
In the code I mentioned, you should specify the standard field types, insted of ODAC types. For example, for ftOraTimeStampTZ - ftTimeStamp, for ftOraNumber - ftFloat
Re: TVirtualTable suggestions
Well, that's not really useful unfortunately. It would be great if there was an ODAC specific in memory dataset component that worked with all of the Oracle types correctly. I looked into using the "disconnected" property of the OraQuery when it was introduced but had some problems, would that be an option now? Does it support all the datatypes?
-Mark
-Mark
Re: TVirtualTable suggestions
This feature (in memory dataset) is already added to our UserVoice http://devart.uservoice.com/forums/1046 ... ql-dataset and roadmap. However, we cannot tell the exact implementation time frame.
Please describe in more details the problems you have faced with when using the Disconnected property - and we will try to help you solve them.
Please describe in more details the problems you have faced with when using the Disconnected property - and we will try to help you solve them.