【问题标题】:Unable to compile procedure(oracle) in Symfony 1.2无法在 Symfony 1.2 中编译过程(oracle)
【发布时间】:2016-08-08 11:23:04
【问题描述】:
  • 我的程序脚本:-

      $person_id='****';
      $branch_code='****';
          $dbh = Propel::getConnection('propel');
      $stmt = $dbh->prepare("begin create_retired_employment(:p_person_id,:p_branch_code,:p_error); end;");
      $stmt->bindParam(':p_person_id',    $person_id,     PDO::PARAM_STR, 1000);
      $stmt->bindParam(':p_branch_code',  $branch_code,  PDO::PARAM_STR, 1000);
      $stmt->bindParam(':p_error',     $v_status,     PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 10000);
    
      $stmt->execute();
    
  • 日志文件中没有错误显示

  • 程序运行良好,直接在 pl/sql 中运行:-

     set serveroutput on;    
     declare v_err_ms varchar2(200);
     begin 
     create_retired_employment(
     '****',
     '****',
     p_error=>v_err_ms);
     dbms_output.put_line('data=>'||v_err_ms);
    
     end;
      /
    
  • 请帮我看看我的 symfony 1.2 程序代码有什么问题

【问题讨论】:

    标签: oracle stored-procedures symfony1


    【解决方案1】:

    我已经解决了这个问题。第三个变量用于如果过程中的错误但不是过程中的错误,所以在过程中删除这个变量然后提交。这工作正常。

    • 这是当前运行良好的脚本:

           $person_id="****";
           $branch_code="****";
           $dbh = Propel::getConnection('propel');
        $stmt = $dbh->prepare("begin    create_retired_employment(:p_person_id,:p_branch_code); end;");
        $stmt->bindParam(':p_person_id',    $person_id,    PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 1000);
        $stmt->bindParam(':p_branch_code',  $branch_code,  PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 1000);
      
      
      
      $stmt->execute();
      

    【讨论】:

      猜你喜欢
      • 2018-07-03
      • 2012-09-26
      • 1970-01-01
      • 1970-01-01
      • 2013-10-24
      • 1970-01-01
      • 1970-01-01
      • 2012-09-06
      • 1970-01-01
      相关资源
      最近更新 更多