Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem while setting value from Database.
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi I am trying to put Login and Password into Login window of flight application.
I am importing these values directly from database.
Agent NAme get inserted but password is not getting .
It gives following error

The operation cannot be performed.

My code is as below

Code:
dim con,rs
set con=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
con.open"provider=sqloledb.1;server=sudhirp;uid=sa;pwd=sa@123;database=First"
rs.open"select * from QTP",con
Do until rs.eof

SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dim arr
i=0
arr=rs.fields("Login_name")
pwd=rs.fields("Password")
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

I am getting error at following line

Code:
dialog("Login").WinEdit("Password:").Set pwd.
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
I was already given some info about this question please visit vbscripting forum.. and check Problem in Database connection
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting value in a WinObject Ansh123 0 4,352 03-20-2014, 09:44 PM
Last Post: Ansh123
  Setting values in Tabstrip TonyBarker 0 1,855 01-25-2013, 03:32 PM
Last Post: TonyBarker
  Setting the value based on link existence joncfrazier 0 2,189 05-15-2012, 03:53 AM
Last Post: joncfrazier
  Setting up the Scheduler mv8167 3 4,514 03-22-2012, 03:20 AM
Last Post: swathi
Shy Setting a html path to a variable mv8167 2 3,254 09-29-2011, 10:42 PM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 1 Guest(s)