For Executing Query in QTp
set sqlcon = createobject("adodb.connection")
sqlcon.open "your provider Information"
set RS = createobject("adodb.recordset")
RS.open "your Query Here",sqlcon
Var1 = RS.Fields("Field Name")
.....
....
.....
set RS = "Nothing"
set sqlcon = "Nothing"
I hope this will help to working with Database...
Thanks & Regards
Sedhu
On Thu, Aug 29, 2013 at 12:42 AM, bhavin v patel <[email protected]> wrote:
> k so from what I understood..
> You want to execute a query from QTP not form your application. Unless you
> are testing some database Sql tool like toad or sql+
> If you want to execute query from QTP
> 1. you need to connect to your database
> 2. usring record set object you execute query and fetch data
>
> there are so many example online..
>
>
>
> On Wednesday, August 28, 2013 7:47:07 AM UTC-4, shilpa gupta wrote:
>>
>> Hi,
>>
>> we are manually opening the application before running the script from
>> QTP.
>>
>> we need to execute sql query in the application which is already connected
>>
>> for this case, how we execute the query?.
>>
>> On Wednesday, August 14, 2013 9:39:06 AM UTC+5:30, shilpa gupta wrote:
>>
>>> Hi
>>>
>>> Is there any method by which the path of the exe of the application
>>> under test can be get by QTP
>>>
>>> we first launch our windows based application manually (by doubl click
>>> on exe, which is saved in the local system). after that launch QTP. in some
>>> scenarion we want the path of that exe of the AUT.
>>> pls reply
>>> Regards
>>>
>> --
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.