How do u connect database through QTP
tell me both Ms Access and SQL
Answer Posted / prasanth
we can connect to database in QTP using "ADODB" connection
object.
Sample code for SQL Server:
set mycon = createobject("ADODB.Connection")
mycon.open("driver=SQLserver;server=localhost;database=
(database name);trusted_connection=yes")
set myresult=mycon.execute("select * from sample")
while myresult.EOF <> TRUE
msgbox.myresult.fields(0)
myresult.movenext
Wend
you can get the connection strings
for "connectionstrings.com"
Kumar.rnv@gmail.com
Broadridge
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Define object spy ?
What is text/text area checkpoint?
Explain data driven framework?
How to creating an output value using quicktest professional (qtp)?
What are the types of object repositories? Which one is you using?
How do you convert manual test cases to automated test cases?
What is the use of text output value in quicktest professional (qtp)?
Describe synchronization point.
www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example
If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
How to export quicktest professional results to an .xls file?
Explain the types of properties that quick test learns while recording?
Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.
hi guys, pls tell me for testing institution training hub, hitech city is best or not?