将存储过程从SQL Server传递到ORACLE链接服务器

时间:2015-08-18 14:46:36

标签: sql-server oracle stored-procedures

我正在尝试将以下SQL查询作为链接服务器存储过程传递,但是我收到错误,请提前建议,谢谢!

  

Msg 7215,Level 17,State 1,Line 17
  无法在远程服务器'CAFUAT'上执行语句。

说明:

  • CAFUAT = Oracle链接服务器
  • CDBWEB =用户
  • STP_CAF_PERSON =存储过程

代码:

<?php
    if($_GET["id"]){
        $rezIzmjena = mysqli_query($kon, "SELECT * FROM regios WHERE id=". $_GET["id"] ." LIMIT 1");
        $redIzmjena = mysqli_fetch_assoc($rezIzmjena);
        $btnText = "Veranderen";
    }else{
        $btnText = "Toevoegen";
    }
?>
  <div class="box-body">
    <?php if(!isset($_POST["btnSubmit"])){  ?>
    <p class="help-block" style="text-align:center;color:#f00;">De type van de shop moet ingevuld worden!</p>
    <form action="add-regio.php" method="post">
          <input type="hidden" name="txtHidd" id="txtHidd" value="<?php echo $redIzmjena["id"]; ?>" >
           <div class="form-group">
              <input type="text" class="form-control" placeholder="Regionaam" name="txtRegio" id="txtRegio" value="<?php echo $redIzmjena["naam"]; ?>"/>
            </div> 
            <div class="col-sm-12 col-xs-12">
               <textarea class="form-control" rows="6" placeholder="Info over levering" name="txtLevInfo" id="txtLevInfo"><?php echo $redIzmjena["information"]; ?></textarea><br />
              </div>
             <div class="form-group" style="margin-bottom:35px;">
                <label class="col-sm-4 control-label">Deelgemeente : </label>
                <div class="col-sm-8">
                    <select class="form-control" id="txtDeelGem" name="txtDeelGem[]" multiple="multiple" style="height:300px;">
                 <?php
                   $rezKat = mysqli_query($kon, "SELECT * FROM deelgemeentes");
                    while($redKat=mysqli_fetch_assoc($rezKat)){ 
                     $rezTT = mysqli_query($kon, "SELECT regio_deelgemeente_tt.deelgemeente_id as deelID FROM regios 
                                                  INNER JOIN regio_deelgemeente_tt ON regios.id = regio_deelgemeente_tt.regio_id
                                                 WHERE regio_deelgemeente_tt.regio_id = ". $redIzmjena["id"] ."");
                                                  $redTT = mysqli_fetch_assoc($rezTT);

                 if($redKat["id"] == $redTT["deelID"]){
                    $selected = "selected";  
                }else{
                    $selected = "";  
                }
                echo "Selected je : " . $selected;;

                $deelGem = $redKat["postcode"] . " " . htmlspecialchars($redKat["deelgemeente"]);
                echo "<option value=\"". $redKat["id"] ."\" ". $selected .">". $deelGem ."</option>";  
                 }
                    ?>
               </select>
       </div>
    </div><br />

1 个答案:

答案 0 :(得分:1)

只是为了更新,下面是工作查询,加上我重新安装了32位Oracle驱动程序;

EXECUTE('Call STP_CAF_PERSON(?,?,?)', @AVEMAIL OUTPUT, @ANCDPXID OUTPUT, @AVCDPURN OUTPUT) AT [CAFUAT]