Solved

Database error handling

Posted on 2000-02-18
7
259 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

632 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