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. -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php