Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database error handling

Posted on 2000-02-18
7
Medium Priority
?
265 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 150 total points
ID: 2559521
Shylaya,
I'm terribly sorry, but could I receive my points for this question ?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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.
Suggested Courses

916 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