Unable to pass parameter OracleParameter.Value > 4k
Unable to pass parameter OracleParameter.Value > 4k
Hi,
We are stuck with one problem. In our application User can make large query to the DB on UI. We use StoredProcedure and pass User query as where clause. But in some cases the query becomes lengthy and OracleDataAdapter returns "ORA-01460: unimplemented or unreasonable conversion requested" error.
We have observed that when the OracleParameter value (string value) greater than 4k size then the error is coming. Oracle support parameter length around 32k.
How much parameter size is supported by Devart.
Waiting for reply ASAP.
Thanks
Devendra
We are stuck with one problem. In our application User can make large query to the DB on UI. We use StoredProcedure and pass User query as where clause. But in some cases the query becomes lengthy and OracleDataAdapter returns "ORA-01460: unimplemented or unreasonable conversion requested" error.
We have observed that when the OracleParameter value (string value) greater than 4k size then the error is coming. Oracle support parameter length around 32k.
How much parameter size is supported by Devart.
Waiting for reply ASAP.
Thanks
Devendra
Please give us the following information:
1) the exact version (x.xx.xxx) of your dotConnect for Oracle. You can find it in the Tools > Oracle > About menu of Visual Studio;
2) are you using OCI (via Oracle client) or Direct mode?
3) send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment;
4) the versions of your Oracle server and Oracle client (for the OCI mode).
The parameter's size depends on the parameter's type. E.g., OracleDbType.VarChar's max size is 4000 bytes.
1) the exact version (x.xx.xxx) of your dotConnect for Oracle. You can find it in the Tools > Oracle > About menu of Visual Studio;
2) are you using OCI (via Oracle client) or Direct mode?
3) send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment;
4) the versions of your Oracle server and Oracle client (for the OCI mode).
The parameter's size depends on the parameter's type. E.g., OracleDbType.VarChar's max size is 4000 bytes.
The 6.10.126 build of dotConnect for Oracle includes the mentioned fix.
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20584 .
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20584 .
Hi Shalex,
I have verified with the 6.10.126 build and still it is not working. I am setting OracleParameter in following manner:
// passing "whereClause" variable with data length around 29750 characters
OracleParameter parameterCnt = new OracleParameter();
parameterCnt.OracleDbType = OracleDbType.VarChar;
parameterCnt.ParameterName = "whereClause";
parameterCnt.Direction = ParameterDirection.Input;
parameterCnt.Value = whereClause;
I am still getting "ORA-01460: unimplemented or unreasonable conversion requested" exception. Could you please verify at your end.
Thanks & Regards
Devendra
I have verified with the 6.10.126 build and still it is not working. I am setting OracleParameter in following manner:
// passing "whereClause" variable with data length around 29750 characters
OracleParameter parameterCnt = new OracleParameter();
parameterCnt.OracleDbType = OracleDbType.VarChar;
parameterCnt.ParameterName = "whereClause";
parameterCnt.Direction = ParameterDirection.Input;
parameterCnt.Value = whereClause;
I am still getting "ORA-01460: unimplemented or unreasonable conversion requested" exception. Could you please verify at your end.
Thanks & Regards
Devendra
I cannot reproduce the ORA-01460 error with dotConnect for Oracle v 6.10.126. Please make sure that:
1) Devart.Data.dll v 5.0.227 and Devart.Data.Oracle.dll v 6.10.126 are loaded to the process of your application (the Debug > Windows > Modules menu of VS);
2) you are setting the Size properties of your OracleParameter objects in the code explicitly.
If the problem persists, please send us a small test project with the corresponding DDL/DML script to reproduce the problem in our environment.
1) Devart.Data.dll v 5.0.227 and Devart.Data.Oracle.dll v 6.10.126 are loaded to the process of your application (the Debug > Windows > Modules menu of VS);
2) you are setting the Size properties of your OracleParameter objects in the code explicitly.
If the problem persists, please send us a small test project with the corresponding DDL/DML script to reproduce the problem in our environment.
Devendra, we have received your test project. If I am setting the parameter size explicitly, it works in my environment.
Please follow these steps:
1) set the size of your "whereClause" parameter explicitly to 4022 because the length of your "whereClause" string variable is 4022:
//parameterCnt.Size = 2000;
-->
parameterCnt.Size = 4022;
2) set the break point in your code and navigate to the Debug > Windows > Modules menu of Visual Studio to make sure that Devart.Data.Oracle.dll of the 6.10.126 version is loaded to the process of your application.
If this doesn't help, please send me the script of your stored procedure.
Please follow these steps:
1) set the size of your "whereClause" parameter explicitly to 4022 because the length of your "whereClause" string variable is 4022:
//parameterCnt.Size = 2000;
-->
parameterCnt.Size = 4022;
2) set the break point in your code and navigate to the Debug > Windows > Modules menu of Visual Studio to make sure that Devart.Data.Oracle.dll of the 6.10.126 version is loaded to the process of your application.
If this doesn't help, please send me the script of your stored procedure.
Unable to pass parameter OracleParameter.Value > 4k
Hi,
In absence of Devendra, I am (Sachin Kumar) working on this issue.
I have verified the sample application (which Devendra has sent you) with the 6.10.126 build and it is not working. Even I have verified this issue with your latest version 6.30.202 also but the same error is displayed.
Error:
ORA-01460: unimplemented or unreasonable conversion requested
Could you please verify it again at your end and let me know your finding.
Thanks
Sachin
In absence of Devendra, I am (Sachin Kumar) working on this issue.
I have verified the sample application (which Devendra has sent you) with the 6.10.126 build and it is not working. Even I have verified this issue with your latest version 6.30.202 also but the same error is displayed.
Error:
ORA-01460: unimplemented or unreasonable conversion requested
Could you please verify it again at your end and let me know your finding.
Thanks
Sachin
Sachin,
As we answered to Devendra by e-mail, we cannot reproduce the issue in our environment.
Please follow these steps:
1) set the break point in your code and navigate to the Debug > Windows > Modules menu of Visual Studio to make sure that Devart.Data.Oracle.dll of the 6.30.202 (or 6.10.126) version is loaded to the process of your application;
2) Devendra has sent only DDL script of the TEST_WELL_RES_MAT_VIEW table. Maybe we need some test data (DML script) to reproduce the issue?
3) tell us the exact text of the error, your call stack, and the line of code where the error occurs;
4) specify the version of your Oracle server and its NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET settings.
You can post information here or send it via our contact form.
As we answered to Devendra by e-mail, we cannot reproduce the issue in our environment.
Please follow these steps:
1) set the break point in your code and navigate to the Debug > Windows > Modules menu of Visual Studio to make sure that Devart.Data.Oracle.dll of the 6.30.202 (or 6.10.126) version is loaded to the process of your application;
2) Devendra has sent only DDL script of the TEST_WELL_RES_MAT_VIEW table. Maybe we need some test data (DML script) to reproduce the issue?
3) tell us the exact text of the error, your call stack, and the line of code where the error occurs;
4) specify the version of your Oracle server and its NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET settings.
You can post information here or send it via our contact form.