Results 1 to 4 of 4

Thread: Import From Database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    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?



  2. #2

    Re: Import From Database

    which data base u r using oracle or SQL server or MS Access?


  3. #3
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    Re: Import From Database

    SQL server


  4. #4

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact