Micro Focus QTP (UFT) Forums
Time out problem while executing a querry ... - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Time out problem while executing a querry ... (/Thread-Time-out-problem-while-executing-a-querry)



Time out problem while executing a querry ... - rajvanan - 01-30-2010

Hi,

The QTP is connected to Oracle try ODBC. Now while my script runs a querry , which takes 30 - 40 secs for its execution, the qtp throws a time out. And the connection is lost.

Can anyone pls help me with this prob?


RE: Time out problem while executing a querry ... - Saket - 02-01-2010

can you paste whetever you have tried, it will help us to find out the issue if any.


RE: Time out problem while executing a querry ... - rajvanan - 02-01-2010

Yes sure, here is the code...............

Code:
Dim dsn_name, db_name, db_user, db_pwd, DB_String
   Dim Table_Rows, Row_Select
        dsn_name = Environment("Dsn_Name")
        db_name = Environment("Db_Name")
        db_user = Environment("Db_User")
        db_pwd = Environment("Db_Pwd")
        DB_String = "DSN="&dsn_name&"; UID="&db_user&"; PWD="&db_pwd&"; DBQ="&db_name&"; DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=F;CSR=F;FWC=F;FBS=64000;TLO=O;"
        Set con = createobject ("ADODB.Connection")
        Set rs = createobject("ADODB.Recordset")
        con.open DB_String
        DB_Query = "select  *  from debkart"
        Set rs = con.Execute(DB_Query)


Now after the execution of con.execute , QTP is giving time out problem.

Pls help.


Code:
Dim dsn_name, db_name, db_user, db_pwd, DB_String
   Dim Table_Rows, Row_Select
        dsn_name = Environment("Dsn_Name")
        db_name = Environment("Db_Name")
        db_user = Environment("Db_User")
        db_pwd = Environment("Db_Pwd")
        DB_String = "DSN="&dsn_name&"; UID="&db_user&"; PWD="&db_pwd&"; DBQ="&db_name&"; DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=F;CSR=F;FWC=F;FBS=64000;TLO=O;"
        Set con = createobject ("ADODB.Connection")
        Set rs = createobject("ADODB.Recordset")
        con.open DB_String
        DB_Query = "select  *  from debkart"
        Set rs = con.Execute(DB_Query)


ow after the execution of con.execute , QTP is giving time out problem.

Pls help.


RE: Time out problem while executing a querry ... - Saket - 02-01-2010

I am not able to understand the DB_string, anyways can you try below and let me know if this works?
Code:
rs.Open DB_Query, ConObj,adLockPessimistic