Skip to main content
Participant
August 20, 2007
Question

Error Executing Database Query

  • August 20, 2007
  • 2 replies
  • 512 views
We have a number of stored procedures call with either cfquery or cfstoredproc. The queries are not erroring on the SQL side, but their executing times are periodically over 45 seconds (one ran 20 minutes the other day!). Coldfusion is throwing the error "Error Executing Database Query." Is there a way to gracefully direct the user around this type of error? Is there something in cfquery or cfstoredproc that I can set a timeout value? Any advice would be appreciated!
This topic has been closed for replies.

2 replies

Inspiring
August 21, 2007
Do these queries take that long when you run them outside of cold fusion? Maybe you have a connection/driver problem.
Participating Frequently
August 21, 2007
You can set the timeout by,
<cfquery name="qryName" datasource="dsName" timeout="">
</cfquery>

For more information please check the link below.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_17.html

I will be better if you can optimize your queries and decrease your query execution time.

Thanks