This error can have a number of causes.:
- You are using an Oracle client that does not know the database character set used (eg. AL32UTF8 or WE8ISO8859P15)
- The tool you are using is not configured for the databases version (check the supplier)
- The client NLS_LANG does not match the database NLS_LANG
You can also get this error when you bind a variable which is longer than the length you specify.
For example, take this piece of php code:
$qry="select value from atable where name=:name"; $stmt=OCIParse($conn, $qry); OCIBindByname($stmt, ":name", $_GET['parameter'], 30); OCIExecute($stmt);
When the value of the passed parameter is less than or equal to 30 characters, you will see no problem.
Then the length exceeds 30 characters, you will see this error, probably followed by one of the following errors if you don’t die after the bind failed:
Either jump out of your program with the die statement, or limit the length of the passed parameter:
OCIBindByname($stmt, ":name", $_GET['parameter'], 30) or die 'Could not bind parameter';