How do u connect database through QTP
tell me both Ms Access and SQL
Answers were Sorted based on User's Feedback
Answer / 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 |
What is exact difference between “while” and “do while” in QTP ?
What is meant by Output Value in UFT?
Hello, I am working on automating unix application using QTP via terminal emulator.Recording and playback works as i execute my test case. I need to parameterise my data now. Steps to be followed 1. go to the application TeWindow("TeWindow").Window("Connect").WinButton ("Connect").Click 2. Make a transaction to an account I am able to make transaction one at a time (one person when i run the script) and the script is as below and works fine. TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "./4ee.sh" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "a21100002" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "tcccc" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "test" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type "6" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "xexit" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync 3. Now i need to Make a transaction to the account for the list of people available from data table. How do i do this? Please let me know if you can Thanks, Chaya
What is difference between WR and QTP?
How do we retrieve the content from a text box in a web page
Explain different recording modes?
Can I record on netscape browser does it require any special settings ?
how to prepared for first for the first interview?
After running scripts how you report results ,there is any specific report form
How you debug your script?
I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it?
Explain about Test Fusion Report of QTP?