I think, since QTP build in ability to work with DB not used here,
timeout will be controlled by ODBC or/and maybe by DB settings.

On Tue, Feb 17, 2009 at 10:52 AM, Hokrani <hokr...@gmail.com> wrote:
>> See my answer as given below for your questions.
>
>
>>
>> Hi all,
>>
>> I have one Query regarding QTP wait time after it hits the DB Query.
>>
>> Example:
>> '====After Connecting to DB through QTP===
>> Set dbexample = CreateObject("ADODB.Connection")
>> dbexample.ConnectionString= Environment.Value("ConnectionStr")
>> dbexample.Open
>>
>> ===Now i execute the Query ===
>> Set recordset = dbexample.Execute("select top 10* from  ..... order by
>> intaudit_id desc")
>>
>> Now the Outcome of the above Query has two possibilities
>> 1) Successfully pulls the data from the table or
>> 2) It gives the Error msg like "-2147217871 [Microsoft][ODBC SQL
>> Server Driver]Timeout expired"
>>
>> My question is how long the QTP waits after it hits the Query(No
>> matters how long is the Query) or  i.e. what's the time span it waits
>> to give this timeout expired error message. ?
>
> By default it will wait 30 seconds.
>>
>> If there is time span for QTP then can we extend the time limit so
>> that i can make the QTP wait for particular period of time to avoid
>> timeout expired error message ..???
>
>
> Yes, you can change it using CommandTimeout property. It defines how many
> seconds to wait before cancelling an execute method call and generating an
> error.
>>
>> As per my knowladge i think its inbuilt feature with QTP to wait for
>> certian time period (Ex 1 or 2 Minute) after executing the Query and
>> we cant change it...
>
> If you set CommandTimeout equal to zero seconds, the program will wait
> indefinitely i.e.until the query is executed is completed.
>>
>>
>> Correct me if i am wrong.
>
>     You are wrong.....
>>
>>
>> Your help is highly appreciated
>
>     Done, now you pay me half of your salary :-)
>>
>>
>> Thanks,
>> Gopal
>
> - Hoks
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to MercuryQTP@googlegroups.com
To unsubscribe from this group, send email to
mercuryqtp+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to