What is the logic for reading(exporting)the data from flat
files to QTP?Can anyone explain me with an example?

I appreciate it!!!

Thanks!!!
Prasanna



What is the logic for reading(exporting)the data from flat files to QTP?Can anyone explain me wit..

Answer / jhansi rani

the process is
assume the flat file is "abc.txt" which consists of some
data like sno and sname.
first we need to create object for that txt file like

set fso=createobject("scripting.filesystemobject")

next open that file using that fso

set f=fso.opentextfile("path of the txt file",mode)

1 --- readingmode
2 --- writing mode
8 --- append mode

while f.atendofline <> true
f.readline --- to read the line from the text file
.
.
.
.
.
perform require operations
wend


so total script is as follows

Set fso=createobject("scripting.filesystemobject")
Set f=fso.opentextfile("E:\testingexamples\abc.txt",1)
While f.atendofline <> true
msgbox f.readline
wend

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More QTP Interview Questions

What is the difference between two actions?

1 Answers   Wipro,


My project title is "DRUG Audition and research management" it comes which domain?

4 Answers  


How to Analyze the Checpoint results by Standard Checpoint?

1 Answers  


How to Identify broken links in QTP

2 Answers   Ness Technologies,


Can U Explain about QTP tool from older version to latest version also its differences?

0 Answers  






Can someone tel additonal features which has been included under QTP 9.0 which is not there in 8.2 version?

1 Answers  


Hi, i am mallishwari, i am veryn ew to testing but i have very much interest in testing. plse give me some guidence to get the job in testing. send me required documents and faqs to my personal id: mallishwari_urs@yahoo.co.in thans for advance.

2 Answers  


Can anyone please explain me the process of automating an application using QTP as i am new to this?

1 Answers   Fidelity,


There is one parent browser and 'n' number of child browsers on desktop. Write a code to close all the child browsers but parent browser should not be closed.

1 Answers  


Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints

0 Answers  


what is the difference between the modular framework and datadriven frame work

2 Answers  


What is the difference between action & script?

3 Answers  


Categories