Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Database error handling

Posted on 2000-02-18
7
Medium Priority
?
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

721 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