-
Expert Member
Import From Database
How to import data from database to datatable?
For example:
I have a Username and password fields.
For Username, data should be get from the Excel sheet
For Password, data should be get from the database.
How to the write the script?
-
Junior Member
Re: Import From Database
which data base u r using oracle or SQL server or MS Access?
-
Expert Member
-
Junior Member
Re: Import From Database
the below script will use for parameterizing from Excel sheet....
On error resume next
Set objExcel = CreateObject("Excel.Application")
strPathExcel = "C:\Documents and Settings\Madhu Sudhan\Desktop\nanda"
objExcel.Workbooks.open strPathExcel
Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
For i=1 to 5
user= Trim(objsheet.cells(i,1).value)
psd = Trim(objsheet.cells(i,2).value)
systemutil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
dialog("Login").WinEdit("Agent Name:").Set user
dialog("Login").WinEdit("Password:").SetSecure crypt.Encrypt(psd)
dialog("Login").WinButton("OK").Click
If dialog("Login").Dialog("Flight Reservations").Exist Then
dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
dialog("Login").WinButton("Cancel").Click
else
window("Flight Reservation").Activate
window("Flight Reservation").Close
End If
Next
objExcel.Application.Quit
Set objExcel=Nothing
WIth Ragrds..
Nanda..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules