Hi there everyone,

I use *nix-ODBC to connect DB2 server.
When i called a store procedure within an iteration, i got some "no rows found" message (not all store procedure calling) on odbc_result_all. But actually that SP calling has a result when I tested it on BD2 command central. Then when I called again store procedure that give no result, I got the result. I don't know why it happen :( Maybe someone give me some explanation :)


Thanks,

<snip-code>
....

foreach ($arr as $key) {
   $sql = "call mystore('".$key."')";
   $res = odbc_exec($conn, $sql);
   $val = odbc_result($res, 1);
   odbc_result_all($res);

   // if no rows found
   if (!$val) {
      $sql = "call mystore('".$key."')";
      $res = odbc_exec($conn, $sql);
      odbc_result_all($res);  // --> this give result (with same SP)
   }
}
....
</snip-code>

Tatang Widyanto

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to