I am using the Laravel-OCI8 package to communicate with Laravel's Oracle Database. I call the oracle function, which returns the result as a CLOB. Here is the Laravel code:
$stmt = $this->pdo_obj->prepare("begin :result := test_pkg.get_data(:param1,:param2,:param3); end;");
$stmt->bindParam(':result', $result, \PDO::PARAM_STR);
$stmt->bindParam(':param1', $param1, \PDO::PARAM_STR);
$stmt->bindParam(':param2', $param2, \PDO::PARAM_STR);
$stmt->bindParam(':param3', $param3, \PDO::PARAM_STR);
$stmt->execute();
return response($result);
But I get the error message: ORA-06502: PL / SQL: numeric or significant error: character buffer too low
I also tried the following:
$response = $this->oracle_obj->select("select test_pkg.get_data('$param1','$param2','$param3') as refc from dual");
But in my case, it is not possible to use the above call, since there are DML operations inside my function. Is there any other method to call the oracle function in Laravel using OCI8?
source
share