TVirtualTable suggestions

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

TVirtualTable suggestions

Post by MarkF » Fri 08 Aug 2014 19:30

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TVirtualTable suggestions

Post by AlexP » Mon 11 Aug 2014 07:43

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.

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Re: TVirtualTable suggestions

Post by MarkF » Mon 11 Aug 2014 09:44

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TVirtualTable suggestions

Post by AlexP » Mon 11 Aug 2014 15:01

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:

Code: Select all

case DataType of
  ftOraBlob: NewDataType := ftBlob;
  ftOraClob: NewDataType := ftMemo;
{$IFDEF VER9P}
  ftOraTimeStamp: NewDataType := ftTimeStamp;
{$ENDIF}
with the code below:

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...;

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Re: TVirtualTable suggestions

Post by MarkF » Mon 11 Aug 2014 15:11

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.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TVirtualTable suggestions

Post by AlexP » Wed 13 Aug 2014 10:24

In the code I mentioned, you should specify the standard field types, insted of ODAC types. For example, for ftOraTimeStampTZ - ftTimeStamp, for ftOraNumber - ftFloat

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Re: TVirtualTable suggestions

Post by MarkF » Wed 13 Aug 2014 12:27

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TVirtualTable suggestions

Post by AlexP » Wed 13 Aug 2014 13:28

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.

Post Reply