Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve the Data from Database
#3
Solved: 12 Years, 10 Months, 2 Weeks ago Smile 
Thank You Ankur, Now I am getting... No issues

Code:
Option Explicit
'On Error Resume Next
Dim con,rs
Set con=createobject("adodb.connection")
Set rs=createobject("adodb.recordset")

con.open="Provider=SQLNCLI.1;Password=baba;Persist Security Info=True;User ID=Baba;Initial Catalog=baba;Data Source=MICROSOF-BBE3B6\SREE"
rs.open "select * from flight",con


Do until rs.eof
    invokeapplication "D:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
    Dim arr
    i=0
    arr=rs.fields("Userid")
    pwd=rs.fields("pwd")
    dialog("Login").Activate
    dialog("Login").WinEdit("Agent Name:").Set arr
    dialog("Login").WinEdit("Password:").Set pwd
    dialog("Login").WinButton("OK").Click
    If window("Flight Reservation").Exist Then
        reporter.ReportEvent micPass,"Valid Password","Flight Reservation Window Exists"
        else
        reporter.ReportEvent micFail,"InValid Password","Flight Reservation Window doesn't Exists"
    End If
    window("Flight Reservation").Close
    rs.movenext
Loop

rs.close
con.close

Set rs=nothing
Set con=nothing
Reply


Messages In This Thread
Retrieve the Data from Database - by bfakruddin - 12-22-2008, 05:23 PM
RE: Retrieve the Data from Database - by Ankur - 12-22-2008, 11:35 PM
RE: Retrieve the Data from Database - by bfakruddin - 12-29-2008, 01:38 PM
RE: Retrieve the Data from Database - by Ankur - 02-17-2009, 11:45 AM
RE: Retrieve the Data from Database - by newqtp - 02-17-2009, 06:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP Automation: How to retrieve Reporter.Reportevent Message scsenthil 1 5,823 11-14-2013, 07:51 PM
Last Post: spannerj
  How to retrieve ArrayList saved in Environment Variable Gautam26 8 5,813 11-07-2013, 08:26 PM
Last Post: ssvali
Exclamation Retrieve the complete height and width of a browser beyond the visible part as wel learnQtptips 0 2,377 05-22-2013, 09:36 AM
Last Post: learnQtptips
  How to retrieve a value from a table if the application is built in power builder. deepakmehta82 1 3,303 04-26-2013, 07:58 AM
Last Post: shaj
  Issue to use GetVisibleText to retrieve number from a PDF page in QTP11 jsun01 1 3,268 03-09-2013, 09:39 PM
Last Post: jsun01

Forum Jump:


Users browsing this thread: 1 Guest(s)