Skip to Main Content

Select list column's size different between Oracle 11 vs 12

3412273Mar 9 2017 — edited Mar 15 2017

Hi,

I have two tables :

table T1 has one column C1  CHAR (30)

table T2 has one column D1  CHAR (50)

One joint select where 2 columns have different size :

select  DISTINCT T1.C1 from T1, T2 where T1.C1 = T2.D1;

In my C language application, the buffer to bind the selected columns is

char myBuffer [31];          /*  The sizeof C1  add 1 for null terminated string */

With Oracle 11, the application is OK

With Oracle 12, the application is failed due to data overflow.

If myBuffer size is increased to

char myBuffer [51]       /* the sizeof D1 add 1 */

=> With Oracle 12, the application is also OK.

My question:

Is there an Oracle parameter or environment variable,  to set the selected column size to the smaller one of the joint (30)

instead of the bigger (50), to avoid the source modification which is increasing the buffer size ?

Thank you in advance

Comments
Post Details
Added on Mar 9 2017
14 comments
4,921 views