Oracle CLOB support

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
sergio_is_back
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 16.04.2020, 11:20

Oracle CLOB support

Post by sergio_is_back »

Recently I had to work with Oracle functions that are using CLOB output parameters

Unfortunnaly this data type is not fully support in Zeos 7.2
In the base function ConvertDatasetToDbcType DataType ftOraClob is mapped to stUnknow SQL type...

I had tested with enforcing DataType of parameter to ftWideString, it works, but this datatype size is limited by the value of max_oci_string_size constant (4000 characters)...

So I have made a little changes in your code to add :

- A correct support for CLOB
- Add a size member for TZOracleParams, populated by TParam.Size
- Allocate the good buffer size when calling TZOraclePreparedStatement.PrepareInParameters;

I understand it is not the best solution, and I think you can imagine a better implentation...

What is the best way to share my code with ZeosLib project ?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1939
Joined: 17.01.2011, 14:17

Re: Oracle CLOB support

Post by marsupilami »

Hello Sergio,

it depends:
  • You could send us the modified file - attached to a post here on the forums. We would need to know on which svn revision or relese version of Zeos it is based so we can integrate the chages.
  • You also could send us a diff/patch file here on the forums. This should be most easy if you already use a subversion checkout of Zeos. We still would need to know if it is for Zeos 7.2 or Zeos 7.3.
  • If you did a fork from my github repository, you could send a pull request there.
Best regards,

Jan
sergio_is_back
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 16.04.2020, 11:20

Re: Oracle CLOB support

Post by sergio_is_back »

Hi Jan,

You will find attached a zip find containing diff of modified files
Base Zeos version is 7.2.6.1

Tested with :

- Oracle Database server 11g (Express Edition) on CentOS 7 Linux 7
- Oracle instant client x86 11.2.0.4.0
- Oracle instant client x64 11.2.0.4.0
- Delphi professionnal 10.3

Best regards
You do not have the required permissions to view the files attached to this post.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Oracle CLOB support

Post by EgonHugeist »

Sergio, could you switch to 7.3? The explicit oracle types are messy. Do you really need them? OTH 7.3 should support what you need, am i wrong?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply