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