Forum Discussion
With a more complicated query, is there a reason why you're not using DB Query as the option instead of DB table?
As it is, I'm not sure there is a way to change that timeout value in TestComplete. The default for ADO objects is 30 seconds so that is probably what is being used internally.
Your alternative is to build your data driven loop in script code and pass the result set to your keyword test for execution in some fashion. That way you can create your own query objects and such using ADO and over-ride the default command timeout.
As a side note: 37 seconds to execute a Select query against a database is an AWFUL long time. Either you have a whole LOT of data to retrieve or your query is not taking advantage of indexes and is doing table scans. I'd actually take a look at refining your query to see if you can speed it up.
The only Type options that I am seeing are: String, Integer, Double, Boolean, Object, Table, DB Table, and Password. DB Query isn't a choice. As for the query, it is optimized as much as it can be based on the data required for the test.
As for scripting, that is outside of my skill set, so I was hoping for a timeout option parameter.
- tristaanogre7 years agoEsteemed Contributor
When creating a data driven loop in a keyword test, you get the following dialog.
Database query is the option that I selected... and it makes better sense with needing to do a custom query.
As for scripting... a skill worth learning and I'd highly recommend doing so. As useful and functional as Keyword Tests are, they are lacking in the flexibility of being able to do all sorts of custom things that the world of Scripting provides. You will run into situations (and you just did :) ) where GUI wizards and such run their course and you need to do something more advanced. I'd definitely see about taking some online tutorials or courses in getting some training in scripting. I'd start https://www.w3schools.com/js/ for JavaScripting... well worth the time.
- tcsdungeon7 years agoNew Contributor
For me, when I select Database Query, and complete the setup, when I go back into the variables tab:
I see the following:
Thank you for the information about JavaScripting. Looks like, I need to start looking into some classes.
- tristaanogre7 years agoEsteemed Contributor
DB Table is correct. I was more interested as to where things went through in the Wizard.
And yes, definitely look into scripting.
The other place to look is in the operating system side of things and the drivers being used there. TestComplete uses the drivers built into windows to do the SQL connection so it's possible that something there can be adjusted for query timeouts.
Related Content
- 6 years agorizzomeister
- 2 years agomattb