How to connect to data base?
Answers were Sorted based on User's Feedback
QTP supports interaction with Database using ADODB.
Set con = createobject("ADODB.Connection")
Set rs = createobject("ADODB.Recordset")
'Create DSN(DataSourceName) for your database and specify
the DSN here
'You can also establish connection using Provider name
con.open "DSN=MyDsn;UID=ravi;PWD=sample123"
con.execute "Insert into emp values(2500, 'Ravi')"
'Retrieve data from database
rs.open "select * from emp", con
while not rs.eof
msgbox "ID = " & rs(0) & " Name = " & rs(1)
rs.movenext
wend
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / m.s.patil
You can write OLEDB script:
Set Con =CreateObject("ADODB.Connection")
ConString="Provider:SQLNCLI;Server=plantdev;DataBase=QAServe
r;UID=patil;PWD=password1"
Con.ConnectionString=ConString
Con.Open
Is This Answer Correct ? | 0 Yes | 1 No |
1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent
How we can we create a Text checkpoint in QTP 9.1,Actually what i did is first i put in recording mode and gofor Inser menu>Checkpoint>Textcheckpoint>click,Now an hand symbol came and i showed it to some textbox and cliked but the QTP9.1 is giving an error message like "The Obkect you are selecting doesn't support this operation" If i go for Help of QTP 9.1 information I didn't get any solution,pls help me in this issue.
What is the difference between browser sync and page sync in QTP?
What are benefits of qtp?
What is throw object?
What is the main disadvantage of using low level and Analog modes?
What is clean sweep?
How many types of recording facility are available in QTP?
The Senario is Steps to do 1.Entered userid in textbox 2.saved with details 3.i want to open user which i have created its in hurry.....
How do u insert an object during runtime in qtp?
Can we write class for vb script in Quick Test Professional?
Can we do Load Testing with QTP?