Kim Berg Hansen
Member
Hi,
We face same problem as this thread:https://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=showflat&Number=61796&an=
We are migrating the database from 12.1 on Windows to 19.7 on Linux.
Our C++ DOA code suddenly gets Access Violations different places.
We have determined it happens in these conditions:
- if we use TOracleDataset
- if the SELECT list of the query contains a function call with at least one bind variable
- the function returns VARCHAR2
- the function returns a non-null value
Then we get Access Violation.
The database has max_string_size=standard (we are not using 32K extended strings.)
It can be reproduced no matter if we compile to 32 bit and use 12.1 32 bit client, compile to 32 bit and use 19c 32 bit client, or compile to 64 bit and use 19c 64 bit client.
If we surround the function call in a CAST like this:
cast(arrow.test2return_varchar2('What', 'GB') as varchar2(4000 char))
Then the error goes away and it works. Which is strange, because when we have max_string_size=standard and the function returns VARCHAR2, then it would by default return a varchar2(4000) anyway?
Also if we use only literals or columns as arguments to the function (no bind variables), then the error also does not occur.
Since the error does not occur when the function returns a NULL value (even with bind variables), it looks like the problem lies not directly in the parsing, but it happens when fetching starts?
If we use TOracleQuery, then the same query works with no issues. The error only occurs for TOracleDataset.
Any ideas?
Cheerio
/Kim
We face same problem as this thread:https://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=showflat&Number=61796&an=
We are migrating the database from 12.1 on Windows to 19.7 on Linux.
Our C++ DOA code suddenly gets Access Violations different places.
We have determined it happens in these conditions:
- if we use TOracleDataset
- if the SELECT list of the query contains a function call with at least one bind variable
- the function returns VARCHAR2
- the function returns a non-null value
Then we get Access Violation.
The database has max_string_size=standard (we are not using 32K extended strings.)
It can be reproduced no matter if we compile to 32 bit and use 12.1 32 bit client, compile to 32 bit and use 19c 32 bit client, or compile to 64 bit and use 19c 64 bit client.
If we surround the function call in a CAST like this:
cast(arrow.test2return_varchar2('What', 'GB') as varchar2(4000 char))
Then the error goes away and it works. Which is strange, because when we have max_string_size=standard and the function returns VARCHAR2, then it would by default return a varchar2(4000) anyway?
Also if we use only literals or columns as arguments to the function (no bind variables), then the error also does not occur.
Since the error does not occur when the function returns a NULL value (even with bind variables), it looks like the problem lies not directly in the parsing, but it happens when fetching starts?
If we use TOracleQuery, then the same query works with no issues. The error only occurs for TOracleDataset.
Any ideas?
Cheerio
/Kim