By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,495 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,495 IT Pros & Developers. It's quick & easy.

Did not close Oracle Database

P: n/a
I have been using something similiar to below for inserting data into
Oracle 9i using PHP but forgot to use the OCILogoff() method to logoff
and was wondering what issues might occur with the Database
connection? So far about 50 records have been inserted into the
database and I will probably have another 200 records when it is
finished in 2 weeks. Now I dont have access to the site due to
permission issues so I wont be able to correct my mistake. Please
advise what kind of Database issues might happen?

CODE
<?php
$c=OCILogon("scott", "tiger", "orcl");
if ( ! $c ) {
echo "Unable to connect: " . var_dump( OCIError() );
die();
}
// Insert data into table...
$s = OCIParse($c, "insert into tab1 values (1, 'Frank')");
OCIExecute($s, OCI_DEFAULT);
// Commit to save changes...
OCICommit($c);
?>

Jun 12 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
te****@hotmail.com wrote:
I have been using something similiar to below for inserting data into
Oracle 9i using PHP but forgot to use the OCILogoff() method to logoff
and was wondering what issues might occur with the Database
connection?
By default, PHP closes all resources when your script finishes running. That
means that all files are closed, and all database connections are
terminated, even if you didn't program the termination explicitly.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

http://acm.asoc.fi.upm.es/~mr/ ; http://acm.asoc.fi.upm.es/~ivan/
MSN:i_*************************@hotmail.com
Jabber:iv*********@jabber.org ; iv*********@kdetalk.net
Jun 12 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.