Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Import From Database

This is a discussion on Import From Database within the QTP forums, part of the Software Testing category; 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 ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 11-02-2007
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
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?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-03-2007
Junior Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
sudhanandareddy is on a distinguished road
Re: Import From Database

which data base u r using oracle or SQL server or MS Access?
Reply With Quote
  #3 (permalink)  
Old 11-03-2007
Junior Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
sudhanandareddy is on a distinguished road
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..
Reply With Quote
  #4 (permalink)  
Old 11-05-2007
Expert Member
 
Join Date: Sep 2007
Location: Hyderabad
Posts: 115
Thanks: 1
Thanked 19 Times in 15 Posts
rajaputra is on a distinguished road
Re: Import From Database

SQL server
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
How can I export / import the tables from one database to another Geek_Guest Oracle 2 07-30-2007 09:22 AM
What is need to import java.awt.event.* Geek_Guest Java 1 05-29-2007 05:29 AM
Import sources from different databases josephreddy Data Warehousing 1 04-20-2007 03:03 AM
Microsoft CRM : 5 ways to import data Jim.Anderson Microsoft CRM 0 09-27-2006 07:39 AM
WebSphere V5.0 : Import and export Lokesh M Web Tools 0 05-27-2006 07:26 AM


All times are GMT -4. The time now is 04:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved