Whatever message this page gives is out now! Go check it out!
cfquery tag and passes it to the specified driver for the data source. The driver request is handled by a thread. By default, the ColdFusion Administrator is configured to limit the amount of active threads to 5. cfquer y tag to return results before processing the rest of the page. The timeout attribute in the cfquery tag is the maximum number of seconds for the query to execute before returning an error indicating that the query has timed-out. timeout attribute is currently supported by the SQL Server ODBC driver, and the DB2 and Informix native drivers. It is not supported by the Oracle native driver, Sybase native driver, the Oracle ODBC driver, and many other ODBC drivers. cfquery tag which makes a request to the data source already in use from a previous request, ColdFusion Server will use the same instance of the driver, but create a new thread for the request. Please note that during this time, there is always one instance of the driver in memory.timeout attribute in the cfquery tag) and return an error to the user. Please note that the ability to set the timeout for the connection depends on which driver you are using. You can trap this error and handle it programmatically with thecftry/cfcatch tags. Your code would look similar to the following. <h2>Try to Insert row...</h2>
<cfset commitIt="Yes">
<cftransaction action="BEGIN">
<cftry><!--- Try running this stored procedure ---><!--- If it fails, it will jump down to the CFCATCH statement ---><!--- Use Native Driver --->
<cfquery name="insData"
DATASOURCE="ORA_NATIVE"
DBTYPE="Oracle80">
INSERT INTO EMP(EMPNO, ENAME) VALUES (4989,'Newman') </cfquery><cfif commitIt EQ "Yes"><p>INSERT ran okay, Commit transaction</p><cftransaction action="COMMIT" /></cfif><!--- If the Stored Procedure FAILS, Catch it here ---><!--- and tell them what went wrong ---><cfcatch type="Database"><cfoutput><h3>Oops, You've thrown a database error</h3> Message :#CFCATCH.message# <p> Type :#CFCATCH.type# <p><cfset commitIt = "No"><p><i>Rolling back the attempted transaction</i></p><cftransaction action="ROLLBACK" /></cfoutput></cfcatch></cftry></cftransaction>cfquery tag attributes, ColdFusion views each cfquery call as a different data source and opens a new connection.