Hi
see this code
it could be helpful

Dim objCon,objRs

Set objCon = CreateObject("adodb.connection")

Set objRs = CreateObject("adodb.recordset")


 objCon.Open ("Provider=
sqloledb;Server=ARVIND-PC\SQLEXPRESS;uid=sa;pwd=----;database=------")

objRs.Open "Select * From emp",objCon

'While  objRs.EOF

id=objRs.Fields("id")
EName=objRs.Fields("id")
Eage=objRs.Fields("age")
Esal=objRs.Fields("sal")

print "Emp_name_"&Ename&vbtab&"Age_"&Eage&vbtab&"Sal_"&Esal
'Wend
objCon.Close


Regards
Arvind Patel


On Wed, Sep 26, 2012 at 4:31 PM, Santosh Gupta <[email protected]> wrote:

> ok, I have to connect sql server db and need to check the validations
>
>
> On Wed, Sep 26, 2012 at 2:44 PM, Mangalarapu Srinivas <
> [email protected]> wrote:
>
>> Tell me what is u r requirement, You want to test DB using QTP or
>> manually, there are so many concept for DB testing, QTP don't have all
>> future to test all the DB concepts.
>> Based on u r need I can suggest.
>> Regards,
>> Srinivas Mangalarapu
>>
>>
>>
>> On Wed, Sep 26, 2012 at 9:16 AM, Santosh Gupta <[email protected]> wrote:
>>
>>> Thanks Srini.....any links to learn DB Testing would be
>>> great..................
>>>
>>> On Tue, Sep 25, 2012 at 7:58 PM, Mangalarapu Srinivas <
>>> [email protected]> wrote:
>>>
>>>> Function OpenConnection(sServer,sDBName,sUserid, sPassword)
>>>>
>>>>
>>>> cnnState=False
>>>> OpenConnection=False
>>>>
>>>> Set cnn = CreateObject("ADODB.Connection")
>>>>  cnn.Open "Provider=SQLOLEDB.1;Password=" & sPassword & " ;Persist
>>>> Security Info=True;User ID=" & sUserID & ";Initial Catalog=" & sDBName& 
>>>> ";Data
>>>> Source=" & sServer
>>>>
>>>> If cnn.State = 1 Then
>>>> OpenConnection = True
>>>>  cnnState=True
>>>> Else
>>>> OpenConnection = False
>>>>  End if
>>>>
>>>> End Function
>>>>
>>>> Regards,
>>>> Srinivas Mangalarapu
>>>>
>>>>
>>>> On Tue, Sep 25, 2012 at 7:47 PM, Santosh Gupta <[email protected]>wrote:
>>>>
>>>>> Hi Guys,
>>>>>
>>>>> Could you please help me out to find out QTP and MS SQL SERVER
>>>>> database connectivity and how to proceed with database testing.
>>>>>
>>>>> Many Thanks,
>>>>> S
>>>>>
>>>>>  --
>>>>> 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
>>>> "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
>>> "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
>> "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
> "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
"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

Reply via email to