oracle资料库函式库
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-05-25
s->Debug) { echo "Debug: Disconnecting $this->Query_ID...<br>n"; } if ( $this->Query_ID < 1 ) { echo "<B>Warning</B>: disconnect(): Cannot free ID $this->Query_IDn"; # return(); } ora_close($this->Query_ID); $this->Query_ID=0; } /* private: error handling */ function halt($msg) { if ($this->Halt_On_Error == "no") return; $this->haltmsg($msg); if ($this->Halt_On_Error != "report") die("Session halted."); } function haltmsg($msg) { printf("</td></tr></table><br><b>Database error:</b> %s<br>n", $msg); printf("<b>Oracle Error</b>: %s (%s)<br>n", $this->Errno, $this->Error); } function table_names() { $this->connect(); $this->query(" SELECT table_name,tablespace_name FROM user_tables"); $i=0; while ($this->next_record()) { $info[$i]["table_name"] =$this->Record["table_name"]; $info[$i]["tablespace_name"]=$this->Record["tablespace_name"]; $i++; } return $info; } // Some transaction support // Methods are used in ct_oracle.inc function begin_transaction() { $this->connect(); // Now, disable autocommit Ora_CommitOff($this->Link_ID); if ($this->Debug) { print "BEGIN TRANSACTION<BR>"; } } function end_transaction() { if ($this->Debug) { print "BEGIN TRANSACTION<BR>"; } $res = 1; if(!@Ora_Commit($this->Link_ID)) { Ora_CommitOn($this->Link_ID); $this->halt("Unable to finish transaction"); $res = 0; } // Enable autocommit again Ora_CommitOn($this->Link_ID); if ($this->Debug) { print "END TRANSACTION : $res<BR>"; } return $res; } } ?> |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于oracle资料库函式库的所有评论