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

x
?
Solved

Oracle Error from Coldfusion

Posted on 2010-11-16
3
Medium Priority
?
393 Views
Last Modified: 2012-05-10
My insert statement is failing. I want to know the Oracle Error exception that is being thrown as a result.

How do I find the oracle error caused?

Thank you
sshivanna
0
Comment
Question by:sshivanna
[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
3 Comments
 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 34152429
well i did not understood your question though
0
 
LVL 2

Author Comment

by:sshivanna
ID: 34155492
When you program in oracle and if there is any runtime error, the oracle database usually throws a ORA error. In PL/SQL we use sqlerrm to see what error has occured. How can we accomplish the same in coldfusion?
0
 
LVL 4

Accepted Solution

by:
docnica earned 2000 total points
ID: 34170701
put your cfquery code inside a cftry, then use

<cfcatch type="Database">
        <h1>Database Error</h1>
        <cfoutput>
        <ul>
            <li><b>Message:</b> #cfcatch.Message#
            <li><b>Native error code:</b> #cfcatch.NativeErrorCode#
            <li><b>SQLState:</b> #cfcatch.SQLState#
            <li><b>Detail:</b> #cfcatch.Detail#
            </ul>
        </cfoutput>
        <cfset errorCaught = "Database">
    </cfcatch>

The native error code and sqlstate are the DBMS original errors.

complete example at: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0bb9b-7fef.html
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

670 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