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 is the use of "Step Generator" in QTP??for what purpose we are using??explain with an example

2 Answers  


What are the most frequent errors you faced while executing your scripts?

1 Answers  


What is an Custom Object in QTP ?

1 Answers  


WHO IS THE BEST FACULTY FOR QTP IN HYDERABAD? A) NAGESHWAR RAO- MINDQ B) SURESH REDDY -SMART SOLUTIONS C) SURESH BABU- Q EDGE D) VENKAT - LIVE TECH E) GC.REDDY - HI-TECH CITY F) NONE OR OTHERS

7 Answers  


I am trying to write a descriptive program for clicking on a perticular link.For that i wanted an index or location of that object.But when I viewing through spy, There was no index property of that object.What to do for getting index value.How can I get index? please any one let me know.

5 Answers  






How to load an object to a object repository at RUN TIME ?

3 Answers  


How to use the object spy in quicktest professional (qtp) 8.0 version?

0 Answers  


Hi, Where should I get all the test's results If I ran the scripts in Batch run. At the result window I found only last test result. Could any one help me on this?

3 Answers   Livetek,


Add parameters during time in each row in one column

0 Answers  


How can we do Data driven testing Using For loop in QTP?

2 Answers  


Which object model ur used in ur project

2 Answers   Cap Gemini,


HOW MANY WAYS ARE THERE TO CPY TEST IN TEST LAB

2 Answers   IGT,


Categories