Hi, my requirement is to make a query in SQL using QTP. And
i have to get the results of that query and i have to use
those results for future testing.
I created a driver but i dont know the code for using this
Driver. please help me by providing the solution for y
requorement
Answer / Shivendra Pratap
You can use QTP's SQL Command task to execute SQL queries. After executing the query, you can save the results in a test variable for future usage. Here is an example:n```vbnetnSet rs = Description.CreateObject("ADODB.Recordset")nrS.Open SQLCommand, conn, 3nSet tResult = TestObjectRepository.Create('YourTestVariableName')ntResult.Value = rs.Fields(0).Valuen``` Replace `SQLCommand`, `conn`, and `YourTestVariableName` with your specific details.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the Limitations of Testing ?
Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?
How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If
Using Object Repository is a advantage or disadvantage?
How iteration is related to Test Results in QTP?
How to make arguments optional in a function?
What is difference between Recording time object identification and Run time (Execution) time.
Tell me the difference between QTP9.2, QTP9.5 and QTP10.0
how would you go for testing a web application like any jobsite?(using manual n qtp)..pls frnds its very urgent ..i need realtime answers...thanks in advance
PLS REAL TIMERS WRITE THE ANS FOR THIS? WHICH SCRIPT IS USED IN REAL TIME NOW A DAYS 1)SHARED REPOSITORY BASED SCRIPT 2)DESCRIPTIVE PROGRAMMING BASED SCRIPT?
if my application shows 100 records and in my database having 200 records how i can validate using QTP tool?plz exp. in detail?
what is difference betweein qtp 9.0 and 9.2