Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

gp


{ City }
< Country > india
* Profession *
User No # 31970
Total Questions Posted # 1
Total Answers Posted # 1

Total Answers Posted for My Questions # 2
Total Views for My Questions # 7041

Users Marked my Answers as Correct # 9
Users Marked my Answers as Wrong # 1
Questions / { gp }
Questions Answers Category Views Company eMail

We have one Package(which has many function/procedures, SQL quires etc). Now we need to check, which query or procedure is taking lot of time in that Package. ? How do we do it.

IBM,

2 Oracle General 7041




Answers / { gp }

Question { 9179 }

How to use Text file (Notepad) as ur data source in QTP?
Can u please provide some function code for it?


Answer

For this you need create File system object.
Below code is for reading from text file


Const ForRead=1

Dim objFSO, objFile, strText
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Reading code
Set objFile=objFSO.OpenTextFile("z:\filetext.txt", ForRead)
Do until objFile.AtEndOfStream

strText=objFile.ReadLine
msgbox strText
Loop

objFile.close

Set objFile = nothing
Set objFile1 = nothing
Set objFSO =nothing

"strText" variable will now contain data from text file.

Is This Answer Correct ?    9 Yes 1 No