Error trying to use store procedures and return a cursor #830
Unanswered
GilberthRojas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
I was trying to call from Laravel using the library an Oracle 11g stored procedure that returns a cursor, but it gave me an error!
This would be my code in the routes file:
`Route::get('/', function () {
$pdo = DB::connection('oracle')->getPdo(); // Obtener la conexión PDO
});`
SP code:
create PROCEDURE obt_empleados(
resp OUT SYS_REFCURSOR
) AS
BEGIN
OPEN resp FOR
select * from PLAEMPLEADO;
END obt_empleados;
/
Error:
oci_bind_by_name(): Argument #1 ($statement) must be of type resource, Yajra\Pdo\Oci8\Statement given
The error tells me what it is, but I don't know how to solve it.
Beta Was this translation helpful? Give feedback.
All reactions