Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP11 - User Requested Cancel of Current Operation
#1
Not Solved
We're using QTP 11 to test a custom web site that requires a query from an Oracle 11g database. We're seeing QTP fail when the attempting to open the query with a 'user requested cancel of current operation' error. My experience with this in the past led us to increase the odbc timeout value (from a standard 300 all the way to 180,000 and tried a '0' for no timeout).

However, QTP seems to stop the query within 20-25 seconds no matter what the odbc timeout value is and I'm wondering if there is some other default setup value within QTP that is cancelling the query. QTP can handle simpler queries that don't take more than 20-25 seconds. SQL Developer will execute the query in about 60 seconds.

Our trouble shooting steps so far are testing it on multiple physical and one virutal machine, having our database group create a view and verifying the query executes in a SQL tool.

The relevant code is below and the timeout happens on the last line where QTP tries to execute and open the query.


Code:
Set con = CreateObject("ADODB.Connection")
Const adUseClient = 3
con.CursorLocation = adUseClient
con.ConnectionTimeout = 180000

conString = "dsn=" & serverName & "; driver={Oracle in OraClient10g_home1}; uid=" &dbUserName & "; pwd=" & dbPassword
con.Open conString

sQuery = "select p.policy_num " &_
"from "&dbName&".policy p " &_
"left outer join "&dbName&".application a on p.policy_id = a.policy_id " &_
"inner join  "&dbName&".APPLICATION_LOB_RISK_UNIT AR on a.app_id = AR.APP_ID " &_
"where AR.REQUESTED_AMT_OF_INS < 250000 " &_
"and a.INS_PRODUCT_CD = 'A' and p.policy_status_cd = 'A' and p.next_renew_expire_action_cd <> 'E' and a.ins_product_cd = 'A' and a.app_status_cd = '4' and a.rate_method_cd = '1' " &_
"and not exists (select 1 from "&dbName&".cancellation_request cr where p.policy_id = cr.policy_id) " &_
"and not exists (select 1 from "&dbName&".loss_file lf where p.policy_id = lf.policy_id and lf.file_status_cd <> 'C') " &_
"and not exists (select 1 from "&dbName&".application a1 where a1.app_type_cd in ('EN', 'RI') and a1.app_status_cd <> '4' and a1.policy_id = p.policy_id) " &_
"and rownum < 10 " &_
"group by p.policy_num, p.policy_id, a.app_id, a.app_type_cd, a.app_status_cd, p.next_renew_expire_action_cd order by p.policy_num desc"
            
Set objRecordSet = CreateObject("ADODB.Recordset")
objRecordSet.Open sQuery, con
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get input from the user in QTP? shanthiK 10 18,588 08-07-2017, 11:34 PM
Last Post: zunebuggy
  Issues in QTP11.0 with .Net Add-in Nagaraju6 1 2,801 06-29-2016, 02:13 PM
Last Post: Ankesh
  The DataTable.ExportSheet operation failed. Invalid file. Niraj 2 6,288 05-05-2015, 11:40 PM
Last Post: babu123
  Excel operation - to find usedrange of rows & col pooja 1 9,714 02-19-2015, 04:06 AM
Last Post: supputuri
  Unable to generate Scripts using QTP11 Divya Roopa 1 2,083 03-05-2014, 09:07 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 2 Guest(s)