in a database table there are 3 columns (name ,
marks,grade) , in application after retrieving data from
db to fields name, marks click ok button then grade should
displayed ---for this how to write vb script prgm

Answers were Sorted based on User's Feedback



in a database table there are 3 columns (name , marks,grade) , in application after retrieving da..

Answer / baba fakruddin

Let us assume that application is VB application
You can copy and paste in ur PC then analyze u will
understand easily

E.g:

RC=datatable.GetRowCount
msgbox RC

For i= 1 to RC

vbwindow("Form1").vbedit("name").Set DataTable("Name",
dtGlobalSheet)
vbwindow("Form1").vbedit("marks").Set
DataTable("Marks",dtGlobalSheet)
vbwindow("Form1").vbbutton("OK").Click

' Here it will retrieve grade and displays in msgbox
grade=vbwindow("Form1").vbedit("Grade").GetROProperty("text")
msgbox grade

' It places Grade in Run Time Data Table
VbWindow("Form1").VbEdit("Grade").Output CheckPoint("Grade")

' Now we can export that data in to our desired location
Next

Is This Answer Correct ?    3 Yes 0 No

in a database table there are 3 columns (name , marks,grade) , in application after retrieving da..

Answer / kk

I feel, I could not understand your question.
I am not sure this syntax is correct, better to check it.
i=Browser().Page().WebTable().RowCount()

For x=1 to i
myData = Browser.page.WebTable().GetCellData(x,2)
'Assume, 2 is the number of Name Column.
allData=myData
'Use different Logic
Next
You can get all the data in those 3 columns.

The last part in your question is not understandable for me.

Is This Answer Correct ?    0 Yes 0 No

in a database table there are 3 columns (name , marks,grade) , in application after retrieving da..

Answer / kk

allData should be declared Globally, outside of any
Loop/Condition.

allData=myData
I am sorry, correction for the above line.
allData=allData & vbcrlf & allData

I would like to know people feed back, about this posting.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

What are the different types of action?

0 Answers  


How will you handle application crash using recovery scenario manager(step by step process)?

1 Answers  


How many types of recording modes in the qtp?

0 Answers  


I'm facing this problem while automating my application..its a web based apps.. In my application there are few webtables are displaying in the page.In the different cells there are links and action buttons.Problem is there is link in different web tables corresponding to one name.Hence the properties of the objects(say a link) are same except the x,y co ordinate of the object.So my script is not able to distinguish between the two links present in different cells of web tables with same name.Kindly help on this..

3 Answers  


i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i didn't want to use the winAPI to get it ,i 'd like to know whether a QTP function can do it. Eg: SystemUtil.Run "C:\Program Files\.....","","","" 'run an application, and misure the application is activating,then how to get the hwn wihtout using windowns api

0 Answers  


How can I import environment from a file on disk?

0 Answers  


1...HOW MANY TYPES OF OBJECT REPOSITORY ARE THERE IN QTP? 2....WHAT ARE THE REPOSITORY FEATURES EXPLAN. 3...HOW TO CREATE A RECOVERY SCENARIO? WHAT DOES RECOVERY SCENARIO MANAGER DO? 4...OPEN A WORD FILE AND MODIFIED WITH SOME VALUE USING QTP? 5... HOW TO CREATE EXCEL FILE USING QTP? 6... HOW TO RETRIEVE A VALUE FROM WEB TABLE? 7... WHAT IS QC REQUIREMENT TAB DO ? HOW TO MAP THE REQUIREMENT? 8... HOW TO PASS A VALUE FROM EXCEL FILE TO SCRIPT? 9...WHAT IS THE USE OF SPLIT FUNCTION?

1 Answers   RBS,


How to creating an output value using quicktest professional?

0 Answers  


Why we load add-ins in qtp?

0 Answers  


what is Property......End Property loop? how to write sript for it in QTP

0 Answers  


Can the user toggle between using Local OR and shared OR for the same action?

0 Answers  


Did u use check points during ur work experience ?

3 Answers   FedEx,


Categories