how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yahoo.com)thank u
Answer Posted / sunita
Dim sServer, sConn, oConn, sDatabaseName
sDatabaseName = "Migrations"
sServer = "hyrdwsz0010"
Set oConn = CreateObject("ADODB.Connection")
oConn.Open "provider=sqloledb;data source=" & sServer & ";initial catalog=" & sDatabaseName &";Trusted_Connection=Yes;"
oConn.CommandTimeout = 0
Set oRs = oConn.Execute("Select * from dbo.CLIENTLISTSS")
Set RowCount= oConn.Execute("Select Count(*) from dbo.CLIENTLISTSS")
Msgbox FormatNumber(RowCount(0),0)
Msgbox oRs.Fields.Count
Msgbox oRs.Fields.item(1)
arraydata=oRs.GetRows
Msgbox arraydata(1,1)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I lauch my test website using code from qtp in different environmet, uat and PPTE?
How many add-ins comes by default with qtp?
Difference between action & Reusable action?
What is the short cut keys for the following?
What are the check points can be inserted without recording?
How many types of actions are there in quicktest professional (qtp)?
What is Port testing. Whhen will you perform?
Explain process of smart Identification in QTP?
Did the scripts need lot of maintenance? If yes, why?
what is the structure for the data driven framework
Explain building blocks of the bpt framework ?
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
What are the properties you would use for identifying a browser and page when using descriptive programming?
How to test fly out menu in qtp?
How many types of recording modes in the qtp?