Page 1 of 1

Oracle CLOB support

Posted: 16.04.2020, 12:52
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 ?

Re: Oracle CLOB support

Posted: 16.04.2020, 15:19
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

Re: Oracle CLOB support

Posted: 17.04.2020, 08:51
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

Re: Oracle CLOB support

Posted: 12.07.2020, 19:09
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?