Solved

Database error handling

Posted on 2000-02-18
7
236 Views
Last Modified: 2008-02-01
I have created a dynamic web site which fetches content from tables (Using database - oracle 8, OCI functions). If any table is dropped automatically runtime error saying ".........Warning: OCIStmtExecute: ORA-00942: table or view does not exist in appears..........". Can any body give me the solution as how it can be rectified and some decent message may be displayed instead of the above one.
0
Comment
Question by:shylaja
7 Comments
 
LVL 2

Expert Comment

by:maxkir
ID: 2538504

Some hint:

// @ - means suppress errors

@OciExecute($ID, OCI_DEFAULT);

if (OciError($ID))
{
    //Some error happend. You can process it here
}
0
 
LVL 1

Expert Comment

by:aikon
ID: 2538541
Hi Shylaja,

You may change the php error reporting error, and catch the error:

a) Changing the error_level:
Open php3.ini and look for error_reporting parameter, by default it is set to 7 so change it to 5.
Note: Php3.ini is locate where you had specified with --with-configure-file-path
If not, it might be at /usr/lib. You can use phpinfo() function to see where is it.

b) Caching errors:
Use de 'die' function:
OciExecute () or die ("Can't send SQL statement to Oracle server");

Regards.
0
 
LVL 2

Expert Comment

by:gravity
ID: 2540612
No offence to aikon, but I think Shylaja should reject your answer... maxkir has quite obviously answered the question.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:shylaja
ID: 2541483
Thanks Maxkir, Your comment helped.
0
 
LVL 2

Expert Comment

by:maxkir
ID: 2541534
Could you then please accept my comment as the answer ?
If you don't mind ;-))
0
 
LVL 1

Expert Comment

by:aikon
ID: 2546710
No problem gravity ;)
0
 
LVL 2

Accepted Solution

by:
maxkir earned 50 total points
ID: 2559521
Shylaya,
I'm terribly sorry, but could I receive my points for this question ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
can windows 10 wamp send mail()? 3 32
phpmyadmin 3 32
How to use md5 hashing 3 25
unset shopping cart session 15 29
Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now