RE: [PHP-INST] Re: Application Error
| From: | William Cheung | Date: | Thu, 24 Oct 2002 23:56:29 +0000 |
| Subject: | RE: [PHP-INST] Re: Application Error | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-8911@lists.php.net to get a copy of this message | ||
I put some debugging code in and it indicates that all the codes are
executed before the error kicks in.
How could I avoid the memory cannot be read error?
William
-----Original Message-----
From: William Cheung [mailto:william@databyte.com]
Sent: October 24, 2002 4:49 PM
To: PHP Support
Subject: [PHP-INST] Re: Application Error
The following is part of my script and I checked the data file. All rows
got inserted.
<?php
print "Connecting to Oracle...\r\n";
ob_flush();
$conn = ocilogon("abc","12345","Oracle8") or die("Cannot connect
to
Oracle!\r\n");
print "Connected!\r\n";
ob_flush();
print "Loading glacct table...\r\n";
ob_flush();
$fp = fopen(".\GLAccount.csv","r");
while ($data = fgetcsv($fp,100,",")) { //Loop through each data row.
$SQLString = "INSERT INTO glacct
(gla_company_cd,gla_division_cd,gla_acct) VALUES
('company','division','$data[0]')";
$SQLStmt = ociparse($conn,$SQLString);
$SQLReturn = ociexecute($SQLStmt);
If ($SQLReturn) {
ocicommit($conn);
} Else {
ocirollback($conn);
}
}
fclose($fp);
ocilogoff($conn);
?>
William Cheung, B.Sc. MCSE MCDBA
Databyte Corp.