lundi 13 novembre 2017

error trying to execute an oracle procedure with laravel

Im trying to execute an oracle procedure but gave me an error:

oci_execute (): ORA-02019: the description of the connection for the remote database was not found

02019. 00000 - "connection description for remote database not found"

this is my code:

public function fact(Request $request){
  $id_fact = $request->val;

  $id_fact = trim($request->val);


  $conn = oci_connect('xx', 'xxxy' ,'192.168.0.x:xxxx/pdb1');
    if (!$conn) {
        $e = oci_error();
        trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
    } 

    $sql = '
    BEGIN
      INV.PRW_DESC_PED(
        :PNRO,
        :PMSJ
      ); 
    END;
    ';
    $sql = oci_parse($conn,$sql);
    $val1 = $id_fact;
    oci_bind_by_name($sql, ":PNRO", $val1, 32);
    oci_bind_by_name($sql, ":PMSJ", $val2, 32);

    oci_execute($sql); 

    $data = $val2;
    return dd($data);


    //oci_close($conn);

}

its works with a procedure locally



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2iToCdd
via IFTTT

Aucun commentaire:

Enregistrer un commentaire