Oracle Error from Coldfusion

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
LVL 2
sshivannaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
docnicaConnect With a Mentor Commented:
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
 
Gurpreet Singh RandhawaWeb DeveloperCommented:
well i did not understood your question though
0
 
sshivannaAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.